change primary keys in migrations

This commit is contained in:
philipp lang 2021-04-10 02:57:10 +02:00
parent df9b6ca6ed
commit 0f6e5b5737
11 changed files with 17 additions and 17 deletions

View File

@ -14,7 +14,7 @@ class CreateCountriesTable extends Migration
public function up() public function up()
{ {
Schema::create('countries', function (Blueprint $table) { Schema::create('countries', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->string('nami_id')->nullable(); $table->string('nami_id')->nullable();
}); });

View File

@ -14,7 +14,7 @@ class CreateGendersTable extends Migration
public function up() public function up()
{ {
Schema::create('genders', function (Blueprint $table) { Schema::create('genders', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->boolean('is_null'); $table->boolean('is_null');
$table->integer('nami_id'); $table->integer('nami_id');

View File

@ -14,7 +14,7 @@ class CreateRegionsTable extends Migration
public function up() public function up()
{ {
Schema::create('regions', function (Blueprint $table) { Schema::create('regions', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->boolean('is_null'); $table->boolean('is_null');
$table->integer('nami_id')->nullable(); $table->integer('nami_id')->nullable();

View File

@ -14,7 +14,7 @@ class CreateConfessionsTable extends Migration
public function up() public function up()
{ {
Schema::create('confessions', function (Blueprint $table) { Schema::create('confessions', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->integer('nami_id')->nullable(); $table->integer('nami_id')->nullable();
$table->boolean('is_null'); $table->boolean('is_null');

View File

@ -14,8 +14,8 @@ class CreateWaysTable extends Migration
public function up() public function up()
{ {
Schema::create('ways', function (Blueprint $table) { Schema::create('ways', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('title'); $table->string('title');
}); });
} }

View File

@ -14,7 +14,7 @@ class CreateNationalitiesTable extends Migration
public function up() public function up()
{ {
Schema::create('nationalities', function (Blueprint $table) { Schema::create('nationalities', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->integer('nami_id'); $table->integer('nami_id');
$table->timestamps(); $table->timestamps();

View File

@ -14,7 +14,7 @@ class CreateActivitiesTable extends Migration
public function up() public function up()
{ {
Schema::create('activities', function (Blueprint $table) { Schema::create('activities', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->integer('nami_id'); $table->integer('nami_id');
}); });

View File

@ -14,13 +14,13 @@ class CreateMembershipsTable extends Migration
public function up() public function up()
{ {
Schema::create('memberships', function (Blueprint $table) { Schema::create('memberships', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->integer('activity_id'); $table->integer('activity_id');
$table->integer('group_id')->nullable(); $table->integer('group_id')->nullable();
$table->integer('member_id'); $table->integer('member_id');
$table->integer('nami_id')->nullable(); $table->integer('nami_id')->nullable();
$table->timestamps(); $table->timestamps();
$table->unique(['activity_id', 'group_id', 'member_id', 'nami_id']); $table->unique(['activity_id', 'group_id', 'member_id', 'nami_id']);
}); });
} }

View File

@ -14,7 +14,7 @@ class CreateFeesTable extends Migration
public function up() public function up()
{ {
Schema::create('fees', function (Blueprint $table) { Schema::create('fees', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->integer('nami_id'); $table->integer('nami_id');
}); });

View File

@ -14,7 +14,7 @@ class CreateSubscriptionsTable extends Migration
public function up() public function up()
{ {
Schema::create('subscriptions', function (Blueprint $table) { Schema::create('subscriptions', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->timestamps(); $table->timestamps();
}); });

View File

@ -14,7 +14,7 @@ class CreateGroupsTable extends Migration
public function up() public function up()
{ {
Schema::create('groups', function (Blueprint $table) { Schema::create('groups', function (Blueprint $table) {
$table->increments('id'); $table->id();
$table->string('name'); $table->string('name');
$table->string('nami_id')->nullable(); $table->string('nami_id')->nullable();
}); });