Closed wizhippo closed 9 years ago
@gggeek Not sure what you mean?
See fe. dbschema.ini in ezflow.
It relates to the way ezp is supposed to handle db structure starting from schema files, not just from sql
@gggeek I have added one based on your example. This means no change in the db_schema.dba is needed correct?
Exactly.
I never tested it with postgresql though.
If you have an ezp with postgres, the easy way to check if it works is to go to admin interface => check for updates
@gggeek Just ran the upgrade check with this change and there are no issues with eztags. Thanks for the direction.
Sorry, but what's the point of adding dbschema.ini
when the same thing can be achieved directly in SQL file with CREATE TABLE
statements?
@emodric this is all legacy and will never get properly finished but the overarching idea is:
As you can see, these features are so nice that we should have stopped providing sql ages ago
ps: if you change the sql but not the dbschema, and you go to ''update check", you will be told that your db is not good
+1
@gggeek If that is the case, since we already provide SQL files, and dbschema files are not being widely used, I'd rather just update the SQL files.
Your code, your choice :-)
If you do not plan to keep the dba files up to date, remove them from the repo.
Your tables will break when trying to move data from mysql to postgres using ezsqldumpschema. And users will just be told to drop your tables when checking the 'update check page'. But we all know that no-one ever does any of that, right? :-P
I didn't say to remove dbschema files. They're useful when checking for db changes in admin.
What I wanted to say is to update all mysql files and dbschema file to have the same names for indexes, to keep them in sync.
Sorry, my bad. Yes, fixing dba+sql for all dbs and not introducing dbschema.ini is recommended, I thought that you were fixing only the postgres variant in the first place for a specific reason.
Yes, this pull request was specific in the first place, but I guess @wizhippo can update it properly to rename all indexes to have idx_
prefix for example in all files.
@emodric Is this what you were thinking?
Yep!
I also made a comment to fix the unique index name in pgsql schema. I know the original was wrong, but since you're at it, you can fix that too :)
@emodric fixed
Thanks, merging!
should'nt this go as well in the ini settings? (see how oracle deals with these things)