diff --git a/NEWS.mdtext b/NEWS.mdtext index 9f62604..b5f3900 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -1,5 +1,8 @@ # InDefero 1.3.3 - xxx xxx xx xx:xx 2012 UTC +**ATTENTION**: InDefero needs Pluf [a45dc195](http://projects.ceondo.com/p/pluf/source/commit/a45dc195) +or newer to run properly! + ## Bugfixes - If an anonymous or authenticated user had no access to any project in a @@ -10,6 +13,9 @@ authorized_keys file when the public key data contained slashes (thanks to Simon Gareste for the fix!) +- Under PostgreSQL indefero could not be set up because of a circular + foreign key dependency. This has been fixed (issue 800). + - Under PostgreSQL new projects could not be created due to a failing foreign key relation. Adding project tags was not possible for a similar reason. This has been fixed (issue 800, continued). diff --git a/src/IDF/Migrations/Backup.php b/src/IDF/Migrations/Backup.php index 7d4083a..7145560 100644 --- a/src/IDF/Migrations/Backup.php +++ b/src/IDF/Migrations/Backup.php @@ -119,5 +119,9 @@ function IDF_Migrations_Backup_restore($folder, $name) foreach ($full_data as $model => $data) { Pluf_Test_Fixture::load($data, false); } + foreach ($models as $model) { + $schema->model = new $model(); + $schema->createConstraints(); + } return true; } diff --git a/src/IDF/Migrations/Install.php b/src/IDF/Migrations/Install.php index 74709b3..89b5880 100644 --- a/src/IDF/Migrations/Install.php +++ b/src/IDF/Migrations/Install.php @@ -62,6 +62,10 @@ function IDF_Migrations_Install_setup($params=null) $schema->model = new $model(); $schema->createTables(); } + foreach ($models as $model) { + $schema->model = new $model(); + $schema->createConstraints(); + } // Install the permissions $perm = new Pluf_Permission(); $perm->name = 'Project membership'; @@ -122,6 +126,10 @@ function IDF_Migrations_Install_teardown($params=null) $schema = new Pluf_DB_Schema($db); foreach ($models as $model) { $schema->model = new $model(); + $schema->dropConstraints(); + } + foreach ($models as $model) { + $schema->model = new $model(); $schema->dropTables(); } }