Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use an existing database with Redbean [closed]

Tags:

php

redbean

I can't find much about using RedBean with an existing database, other than a Google Groups posting saying you can but it has to match 100%.

I need documentation or information on mapping an existing database for use with Redbean, i.e. I don't want Redbean to create the schema itself, but use the existing database.

Does anyone have experience in doing this?

like image 207
Sam Avatar asked Dec 18 '25 18:12

Sam


1 Answers

Use doctrine if your schema does not follow the redbean conventions

i.e. something like this:

  • object type = table name, lowercase
  • a column named _id is considered a back reference
  • a table named _ is a many-to-many mapping between type a and type b
  • primary key as ID of integer type.
like image 82
Petter Nordlander Avatar answered Dec 20 '25 12:12

Petter Nordlander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!