This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccount/database/migrations/2019_04_25_125710_fix_mail_bug.php

41 lines
1,007 B
PHP
Raw Normal View History

2019-04-25 15:33:15 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class FixMailBug extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table("mails", function(Blueprint $table) {
// e.g. $table->dropUnique('email');
$table->dropForeign('mails_user_id_foreign');
$table->dropUnique('unique_primary_email');
$table->foreign('user_id')->references('id')->on('users');
});
Schema::table("users", function(Blueprint $table) {
// e.g. $table->dropUnique('email');
$table->string('inviteCode')->nullable()->default(null)->comment("Invite code user used to register");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
return false;
// Vorwärts immer, rückwerts nimmer
}
}