From 3c416efa7ece466949c3698668cda46970aa4e75 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 16 Nov 2014 22:54:17 +0000 Subject: [PATCH] Migrations for incidents and components --- ...2014_11_16_224719_CreateIncidentsTable.php | 40 +++++++++++++++++++ ...014_11_16_224937_CreateComponentsTable.php | 34 ++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php create mode 100644 app/database/migrations/2014_11_16_224937_CreateComponentsTable.php diff --git a/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php b/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php new file mode 100644 index 00000000..f8603880 --- /dev/null +++ b/app/database/migrations/2014_11_16_224719_CreateIncidentsTable.php @@ -0,0 +1,40 @@ +increments('id'); + $table->tinyInteger('component')->default(1); + $table->string('name'); + $table->tinyInteger('status', 1); + $table->longText('message'); + $table->timestamps(); + $table->softDeletes(); + + $table->index('component'); + $table->index('status'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('incidents'); + } + +} diff --git a/app/database/migrations/2014_11_16_224937_CreateComponentsTable.php b/app/database/migrations/2014_11_16_224937_CreateComponentsTable.php new file mode 100644 index 00000000..46f32544 --- /dev/null +++ b/app/database/migrations/2014_11_16_224937_CreateComponentsTable.php @@ -0,0 +1,34 @@ +increments('id'); + $table->string('name'); + $table->string('description')->nullable()->default(null); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('components'); + } + +}