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.
|
* Run the migrations.
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function up(): void
|
public function up(): void
|
||||||
@@ -17,9 +16,14 @@ class CreateCitiesTable extends Migration
|
|||||||
|
|
||||||
Schema::create('cities', function (Blueprint $table) {
|
Schema::create('cities', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->foreignId('country_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
$table->foreignId('country_id')
|
||||||
$table->string('name');
|
->constrained()
|
||||||
$table->string('slug')->unique();
|
->cascadeOnDelete()
|
||||||
|
->cascadeOnUpdate();
|
||||||
|
$table->string('name')
|
||||||
|
->unique();
|
||||||
|
$table->string('slug')
|
||||||
|
->unique();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -28,7 +32,6 @@ class CreateCitiesTable extends Migration
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class CreateLecturersTable extends Migration
|
|||||||
Schema::create('lecturers', function (Blueprint $table) {
|
Schema::create('lecturers', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->foreignId('team_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
$table->foreignId('team_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||||
$table->string('name');
|
$table->string('name')->unique();
|
||||||
$table->string('slug')->unique();
|
$table->string('slug')->unique();
|
||||||
$table->boolean('active')->default(true);
|
$table->boolean('active')->default(true);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class CreateVenuesTable extends Migration
|
|||||||
Schema::create('venues', function (Blueprint $table) {
|
Schema::create('venues', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->foreignId('city_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
$table->foreignId('city_id')->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||||
$table->string('name');
|
$table->string('name')->unique();
|
||||||
$table->string('slug')->unique();
|
$table->string('slug')->unique();
|
||||||
$table->string('street');
|
$table->string('street');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|||||||
Reference in New Issue
Block a user