diff --git a/.env.example b/.env.example index ed6e8291..e1bf0707 100644 --- a/.env.example +++ b/.env.example @@ -6,11 +6,11 @@ APP_KEY= APP_TIMEZONE= DB_TYPE=mysql -DB_HOST=db -DB_PORT=3306 +DB_HOST=localhost +DB_PORT=8889 DB_DATABASE=attendize -DB_USERNAME=attendize -DB_PASSWORD=attendize +DB_USERNAME=root +DB_PASSWORD=root DEFAULT_DATEPICKER_SEPERATOR="-" DEFAULT_DATEPICKER_FORMAT="yyyy-MM-dd HH:mm" diff --git a/database/migrations/2019_10_23_151735_create_venues_table.php b/database/migrations/2019_10_23_151735_create_venues_table.php index 00e354f4..c3c560f6 100644 --- a/database/migrations/2019_10_23_151735_create_venues_table.php +++ b/database/migrations/2019_10_23_151735_create_venues_table.php @@ -33,10 +33,6 @@ class CreateVenuesTable extends Migration $t->json('address')->nullable(); }); - Schema::table('events', function (Blueprint $table) { - $table->integer('venue_id')->nullable(); - $table->foreign('venue_id')->references('id')->on('venues'); - }); } /** @@ -46,10 +42,6 @@ class CreateVenuesTable extends Migration */ public function down() { - Schema::table('events', function (Blueprint $table){ - $table->dropForeign('venue_id'); - $table->dropColumn('venue_id'); - }); Schema::dropIfExists('venues'); } diff --git a/database/migrations/2019_11_23_155251_add_venue_to_events_table.php b/database/migrations/2019_11_23_155251_add_venue_to_events_table.php new file mode 100644 index 00000000..3864d333 --- /dev/null +++ b/database/migrations/2019_11_23_155251_add_venue_to_events_table.php @@ -0,0 +1,34 @@ +integer('venue_id')->nullable(); + $table->foreign('venue_id')->references('id')->on('venues'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('events', function (Blueprint $table) { + $table->dropForeign('venue_id'); + $table->dropColumn('venue_id'); + }); + } +}