Pluf Framework

Pluf Framework Git Source Tree


Root/src/Pluf/DB/Schema

File Age Message Size
  ..
blob MySQL.php 12 years 7 months Thomas Keller: When new tables are created (e.g. on initial installations or during upgrades), Pluf used to create foreign key relations as part of the table definitions. This however made problems when two tables, A and B, cross-referenced themselves via a foreign key relation, because strict DBMS like PostgreSQL or MySQL couldn't create such a relation without that both target tables existed prior. This patch changes this behaviour by separating table creation and foreign key setup into two phases, that have to be called after another, namely Pluf_DB_Schema::createTables() and Pluf_DB_Schema::createConstraints(). For "reverse" migrations the same logic is used, at first Pluf_DB_Schema::dropConstraints() has to be called, then Pluf_DB_Schema::dropTables() can be executed. 12.71 kB
blob PostgreSQL.php 12 years 7 months Thomas Keller: When new tables are created (e.g. on initial installations or during upgrades), Pluf used to create foreign key relations as part of the table definitions. This however made problems when two tables, A and B, cross-referenced themselves via a foreign key relation, because strict DBMS like PostgreSQL or MySQL couldn't create such a relation without that both target tables existed prior. This patch changes this behaviour by separating table creation and foreign key setup into two phases, that have to be called after another, namely Pluf_DB_Schema::createTables() and Pluf_DB_Schema::createConstraints(). For "reverse" migrations the same logic is used, at first Pluf_DB_Schema::dropConstraints() has to be called, then Pluf_DB_Schema::dropTables() can be executed. 12.14 kB
blob SQLite.php 12 years 7 months Thomas Keller: When new tables are created (e.g. on initial installations or during upgrades), Pluf used to create foreign key relations as part of the table definitions. This however made problems when two tables, A and B, cross-referenced themselves via a foreign key relation, because strict DBMS like PostgreSQL or MySQL couldn't create such a relation without that both target tables existed prior. This patch changes this behaviour by separating table creation and foreign key setup into two phases, that have to be called after another, namely Pluf_DB_Schema::createTables() and Pluf_DB_Schema::createConstraints(). For "reverse" migrations the same logic is used, at first Pluf_DB_Schema::dropConstraints() has to be called, then Pluf_DB_Schema::dropTables() can be executed. 9.41 kB

Archive Download this version or git clone git://archive.srchub.org/pluf.git Help

Branches

Tags

Number of commits:
Page rendered in 0.16521s using 15 queries.