known icon indicating copy to clipboard operation
known copied to clipboard

Manage database and schema using an ORM

Open benwerd opened this issue 5 years ago • 6 comments

Currently database upgrades and schema changes are handled internally using SQL. This is prone to failure (see #2783).

We should port to Eloquent if possible, or Doctrine if we have to.

I'm not asking anyone else to do this - I'm planning on looking at this.

benwerd avatar Dec 24 '20 20:12 benwerd

Not an ORM. Bad idea.

I have a long term plan to migrate to using doctrine dbal with schema defined in json. We do this in the day job and it's very good.

mapkyca avatar Dec 25 '20 08:12 mapkyca

@mapkyca @benwerd does this mean dropping support for MongoDB ?

ipranjal avatar Apr 29 '21 05:04 ipranjal

That's the plan, at least in core. Mongo has many many problems

mapkyca avatar Apr 29 '21 14:04 mapkyca

i have been playing around with this lately but there is one small thing , is it ok to brake a little bit of backward compatibility ? More like 2.0 update ?

ipranjal avatar Apr 29 '21 16:04 ipranjal

We could do so much with an ORM generating the database schema for us; imagine Known on SQL Server? That would rock! Not sure who else would like to see that, but doing this would make it possible for the community to step in and handle that if we wanted to. I would, but my PHP sucks.

From: Marcus Povey @.> Sent: Thursday, April 29, 2021 10:57 AM To: idno/known @.> Cc: Subscribed @.***> Subject: Re: [idno/known] Manage database and schema using an ORM (#2859)

That's the plan, at least in core. Mongo has many many problems

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fidno%2Fknown%2Fissues%2F2859%23issuecomment-829308090&data=04%7C01%7C%7C59f1ed6b4a8b4b60020008d90b1f0993%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637553050190916793%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=69USiVp9hpORPrSVQZ%2Btdq3MkbV4KrswWiTEW5wC5UI%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADS4MAAJQS66ISRW6QMRAJDTLFXTTANCNFSM4VIQJQ5Q&data=04%7C01%7C%7C59f1ed6b4a8b4b60020008d90b1f0993%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637553050190916793%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3%2BBKV%2Fu67ZUXckxjxtYI1ZAjiu1QrRjZO1EiyfEpdVE%3D&reserved=0.

Cambridgeport90 avatar Apr 29 '21 17:04 Cambridgeport90

I was playing around with \Idno\Data\MySql recently and I changed few queries from the once that are hard coded to the once that are generated form DBAL query builder - https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/query-builder.html#sql-query-builder

using DBAL query builder is a much easier fix to implement than using a full fledged ORM @benwerd my 2 cents on this is using a ORM would be a bad idea

ipranjal avatar Dec 11 '21 21:12 ipranjal