From 6214c7b7066be97ff5d244d09f82dd125c8e2093 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 18 Nov 2013 09:54:00 -0500 Subject: [PATCH] migration for new user and location fields --- ...013_11_18_134332_add_contacts_to_users.php | 40 ++++++++++++++++++ ...013_11_18_142847_add_info_to_locations.php | 41 +++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 app/database/migrations/2013_11_18_134332_add_contacts_to_users.php create mode 100644 app/database/migrations/2013_11_18_142847_add_info_to_locations.php diff --git a/app/database/migrations/2013_11_18_134332_add_contacts_to_users.php b/app/database/migrations/2013_11_18_134332_add_contacts_to_users.php new file mode 100644 index 0000000000..ff9b4b0810 --- /dev/null +++ b/app/database/migrations/2013_11_18_134332_add_contacts_to_users.php @@ -0,0 +1,40 @@ +integer('location_id')->nullable(); + $table->string('phone'); + $table->string('jobtitle'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function($table) + { + $table->dropColumn('location_id'); + $table->dropColumn('phone'); + $table->dropColumn('jobtitle'); + + }); + + } + +} \ No newline at end of file diff --git a/app/database/migrations/2013_11_18_142847_add_info_to_locations.php b/app/database/migrations/2013_11_18_142847_add_info_to_locations.php new file mode 100644 index 0000000000..93eb1c3759 --- /dev/null +++ b/app/database/migrations/2013_11_18_142847_add_info_to_locations.php @@ -0,0 +1,41 @@ +string('address', 80); + $table->string('address2', 80); + $table->string('zip', 10); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('locations', function($table) + { + + $table->dropColumn('address'); + $table->dropColumn('address2'); + $table->dropColumn('zip'); + + }); + } + +} \ No newline at end of file