X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=production%2Fexample_apps%2Fzippy_maps%2Fconfig%2FMigrations%2F20170426150747_create_location_categories_table.php;fp=production%2Fexample_apps%2Fzippy_maps%2Fconfig%2FMigrations%2F20170426150747_create_location_categories_table.php;h=c9fb4c5791a0d22c9d2578a876e0faa7bfaaae99;hb=34d1cb2e8687b826357db1d3821bf9e05cf6f13d;hp=0000000000000000000000000000000000000000;hpb=21f30bb859e6c15393e23ac0e5ef417b82f628a5;p=feisty_meow.git diff --git a/production/example_apps/zippy_maps/config/Migrations/20170426150747_create_location_categories_table.php b/production/example_apps/zippy_maps/config/Migrations/20170426150747_create_location_categories_table.php new file mode 100644 index 00000000..c9fb4c57 --- /dev/null +++ b/production/example_apps/zippy_maps/config/Migrations/20170426150747_create_location_categories_table.php @@ -0,0 +1,42 @@ +table('locations_categories', ['id' => false, 'primary_key' => ['id']]) + ->addColumn('id', 'integer', ['identity' => true, 'signed' => false]) + ->addColumn('location_id', 'integer', ['signed' => false]) + ->addColumn('category_id', 'integer', ['signed' => false]) + ->addColumn('created', 'datetime') + ->addColumn('modified', 'datetime') + ->addForeignKey('location_id', 'locations', 'id') + //not nullable, array('delete'=> 'SET_NULL', 'update'=> 'NO_ACTION') + ->addForeignKey('category_id', 'categories', 'id') + ->create(); + + } +}