Database compatibility minimum requirements

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
oi_antz

Database compatibility minimum requirements

Post by oi_antz »

The next step in my module development should probably be to make the modules compatible with the mainstream databases other than just MySQL.
  • Which databases must I cater for?
  • Is there a config setting that I can use to identify which database is being used?
Cheers, Anthony.
Pierre M.

Re: Database compatibility minimum requirements

Post by Pierre M. »

I suggest PostgreSQL.

Pierre M.
oi_antz

Re: Database compatibility minimum requirements

Post by oi_antz »

Hey, great idea! My first time with Postgres, looks cool as once you get the auto_increment and last insert id figured out. Have made a start on translating my db class, will test more tomorrow.

Cheers!
Pierre M.

Re: Database compatibility minimum requirements

Post by Pierre M. »

Then I suggest SQLLite too.

Pierre M.
oi_antz

Re: Database compatibility minimum requirements

Post by oi_antz »

Dam SQL standards are worse than CSS! I don't think I'm going to bother with pg, its too much jumping through hoops to do the simplest thing as auto-incrementing a primary key. And then there's a lack of standards around naming conventions for sequences, some camps put seq at the start, others at the end, and CMSms doesn't even put the name of the id column in its sequences.

Until there is a better support and universal standard, I'm going to say no: I will not support this fickle product.

Now, let me see about SQLLite.
alby

Re: Database compatibility minimum requirements

Post by alby »

oi_antz wrote: Until there is a better support and universal standard, I'm going to say no: I will not support this fickle product.
Use adodb library functions in your modules, in this way when cmsms support other dbs you don't bother for support them

Alby
oi_antz

Re: Database compatibility minimum requirements

Post by oi_antz »

Nice try, but pg doesn't make life easy, even with our wrapper called adodb. I manage to get my db class converted to use adodb, and find that $adodb->Insert_Id() still doesn't work! It returns boolean false. And I look at how CMSms has used it, they actually have to generate the id before inserting any new row!

I'm afraid pg fails to impress me. Such a blatant thing like this that they seem to give no regard to. I don't know what they're thinking, but it doesn't win my favour - What kind of database can't even manage its own auto-increment fields?
oi_antz

Re: Database compatibility minimum requirements

Post by oi_antz »

I got told to stop being such a stubborn prick, so all my modules are updated to support PostgreSQL now. I have done some testing and it seems to work fine.
oi_antz

Re: Database compatibility minimum requirements

Post by oi_antz »

I tried installing using SQLite, got 404 on frontend and invalid login on backend, and there is no trace of where the db file is kept.

Is it likely my configuration, or is this the normal result of trying to install CMSms with SQLite?
Pierre M.

Re: Database compatibility minimum requirements

Post by Pierre M. »

oi_antz wrote: ...all my modules are updated to support PostgreSQL now. I have done some testing and it seems to work fine.
Good news, thx.
oi_antz wrote: I tried installing using SQLite, got 404 on frontend and invalid login on backend, and there is no trace of where the db file is kept.

Is it likely my configuration, or is this the normal result of trying to install CMSms with SQLite?
Which CMSms version ? which SQLite backend or PHP ? other context info ?
Please describe the database configuration install steps.

Pierre M.
Post Reply

Return to “Developers Discussion”