mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
unique names
This commit is contained in:
@@ -8,7 +8,6 @@ class CreateCitiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
@@ -17,9 +16,14 @@ class CreateCitiesTable extends Migration
|
||||
|
||||
Schema::create('cities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('country_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->string('name');
|
||||
$table->string('slug')->unique();
|
||||
$table->foreignId('country_id')
|
||||
->constrained()
|
||||
->cascadeOnDelete()
|
||||
->cascadeOnUpdate();
|
||||
$table->string('name')
|
||||
->unique();
|
||||
$table->string('slug')
|
||||
->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -28,7 +32,6 @@ class CreateCitiesTable extends Migration
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
|
||||
@@ -18,7 +18,7 @@ class CreateLecturersTable extends Migration
|
||||
Schema::create('lecturers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('team_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->string('name');
|
||||
$table->string('name')->unique();
|
||||
$table->string('slug')->unique();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
|
||||
@@ -18,7 +18,7 @@ class CreateVenuesTable extends Migration
|
||||
Schema::create('venues', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('city_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->string('name');
|
||||
$table->string('name')->unique();
|
||||
$table->string('slug')->unique();
|
||||
$table->string('street');
|
||||
$table->timestamps();
|
||||
|
||||
Reference in New Issue
Block a user