diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 388e9c7..1871275 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,7 @@ - + @@ -25,20 +25,10 @@ - - - - - - - - - - - + @@ -57,11 +47,71 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -86,7 +136,6 @@ @@ -171,8 +224,6 @@ - - @@ -249,11 +300,7 @@ @@ -270,14 +317,6 @@ + + @@ -458,7 +503,9 @@ - + + + 1470207378642 @@ -471,14 +518,14 @@ - - + @@ -514,31 +561,18 @@ - + + + + file://$PROJECT_DIR$/database/migrations/2016_08_23_231059_create_domain_table.php + 16 + + + - - - - - - - - - - - - - - - - - - - - - @@ -695,13 +729,6 @@ - - - - - - - @@ -742,7 +769,6 @@ - @@ -764,9 +790,6 @@ - - - @@ -798,73 +821,106 @@ - + - - + + + + + + + + + + + + + + + + - + - - + + + + + - + - - + + + - + - - + + - + - - + + + - + - - + + - + - - + + - + - - - - - + + + - + - - + + + + + + + + + + + + + + + + + + diff --git a/database/migrations/2016_08_03_064147_add_additional_columns_to_users_table.php b/database/migrations/2016_08_03_064147_add_additional_columns_to_users_table.php index c1131e0..35d303c 100755 --- a/database/migrations/2016_08_03_064147_add_additional_columns_to_users_table.php +++ b/database/migrations/2016_08_03_064147_add_additional_columns_to_users_table.php @@ -14,7 +14,6 @@ public function up() { Schema::table('users', function ($table) { $table->integer('role')->default(0); - $table->integer('domain'); /* * 1->Technical * 2->Management diff --git a/database/migrations/2016_08_23_231059_create_domain_table.php b/database/migrations/2016_08_23_231059_create_domain_table.php new file mode 100755 index 0000000..cf7178b --- /dev/null +++ b/database/migrations/2016_08_23_231059_create_domain_table.php @@ -0,0 +1,31 @@ +increments('id'); + $table->timestamps(); + $table->string('domain'); /* tech, management, or design or any other domain*/ + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('domains'); + } +} diff --git a/database/migrations/2016_08_23_231749_create_user_domains_table.php b/database/migrations/2016_08_23_231749_create_user_domains_table.php new file mode 100755 index 0000000..1d63fdc --- /dev/null +++ b/database/migrations/2016_08_23_231749_create_user_domains_table.php @@ -0,0 +1,32 @@ +increments('id'); + $table->timestamps(); + $table->integer('user_id'); + $table->integer('domain_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('user_domains'); + } +} diff --git a/database/seeds/DomainsTableSeeder.php b/database/seeds/DomainsTableSeeder.php new file mode 100755 index 0000000..3986f1c --- /dev/null +++ b/database/seeds/DomainsTableSeeder.php @@ -0,0 +1,30 @@ +insert([ + 'domain' => 'Technical' + ]); + + DB::table('domains')->insert([ + 'domain' => 'Management' + ]); + + DB::table('domains')->insert([ + 'domain' => 'Design' + ]); + } +}