From 9437a19ee07a6495ff185b408d67f2abb85a60af Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Mon, 19 Oct 2009 11:28:01 +0200 Subject: [PATCH] Added migrations to backup restore indefero to/from a JSON file. --- src/IDF/Migrations/Backup.php | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 src/IDF/Migrations/Backup.php diff --git a/src/IDF/Migrations/Backup.php b/src/IDF/Migrations/Backup.php new file mode 100644 index 0000000..7b6af71 --- /dev/null +++ b/src/IDF/Migrations/Backup.php @@ -0,0 +1,109 @@ +model = new $model(); + $schema->createTables(); + } + $full_data = json_decode(file_get_contents(sprintf('%s/%s-IDF.json', $folder, $name)), true); + foreach ($full_data as $model => $data) { + Pluf_Test_Fixture::load($data, false); + } + return true; +} \ No newline at end of file