Remove existing migration in packages
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateTaggedTable extends Migration {
|
|
||||||
|
|
||||||
public function up() {
|
|
||||||
Schema::create('tagging_tagged', function(Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
if(config('tagging.primary_keys_type') == 'string') {
|
|
||||||
$table->string('taggable_id', 36)->index();
|
|
||||||
} else {
|
|
||||||
$table->integer('taggable_id')->unsigned()->index();
|
|
||||||
}
|
|
||||||
$table->string('taggable_type', 125)->index();
|
|
||||||
$table->string('tag_name', 125);
|
|
||||||
$table->string('tag_slug', 125)->index();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down() {
|
|
||||||
Schema::drop('tagging_tagged');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateTagsTable extends Migration
|
|
||||||
{
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('tagging_tags', function(Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('slug', 125)->index();
|
|
||||||
$table->string('name', 125);
|
|
||||||
$table->boolean('suggest')->default(false);
|
|
||||||
$table->integer('count')->unsigned()->default(0); // count of how many times this tag was used
|
|
||||||
$table->integer('tag_group_id')->unsigned()->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('tagging_tags');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateUsersTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('users', function (Blueprint $table) {
|
|
||||||
$table->bigIncrements('id');
|
|
||||||
$table->string('name');
|
|
||||||
$table->string('email')->unique();
|
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
|
||||||
$table->string('password');
|
|
||||||
$table->rememberToken();
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('users');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreatePasswordResetsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('password_resets', function (Blueprint $table) {
|
|
||||||
$table->string('email')->index();
|
|
||||||
$table->string('token');
|
|
||||||
$table->timestamp('created_at')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('password_resets');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateTagGroupsTable extends Migration {
|
|
||||||
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('tagging_tag_groups', function(Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('slug', 125)->index();
|
|
||||||
$table->string('name', 125);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('tagging_tag_groups');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class UpdateTagsTable extends Migration {
|
|
||||||
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('tagging_tags', function ($table) {
|
|
||||||
$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::disableForeignKeyConstraints();
|
|
||||||
Schema::table('tagging_tags', function ($table) {
|
|
||||||
$table->dropForeign('tagging_tags_tag_group_id_foreign');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* This file is part of Jrean\UserVerification package.
|
|
||||||
*
|
|
||||||
* (c) Jean Ragouin <go@askjong.com> <www.askjong.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class AddVerificationToUserTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine the user table name.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getUserTableName()
|
|
||||||
{
|
|
||||||
$user_model = config('auth.providers.users.model', App\User::class);
|
|
||||||
|
|
||||||
return (new $user_model)->getTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table($this->getUserTableName(), function (Blueprint $table) {
|
|
||||||
$table->boolean('verified')->default(false);
|
|
||||||
$table->string('verification_token')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table($this->getUserTableName(), function (Blueprint $table) {
|
|
||||||
$table->dropColumn('verified');
|
|
||||||
$table->dropColumn('verification_token');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreateAuthenticationLogTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('authentication_log', function (Blueprint $table) {
|
|
||||||
$table->bigIncrements('id');
|
|
||||||
$table->morphs('authenticatable');
|
|
||||||
$table->string('ip_address', 45)->nullable();
|
|
||||||
$table->text('user_agent')->nullable();
|
|
||||||
$table->timestamp('login_at')->nullable();
|
|
||||||
$table->timestamp('logout_at')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('authentication_log');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateFailedJobsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
|
||||||
$table->bigIncrements('id');
|
|
||||||
$table->text('connection');
|
|
||||||
$table->text('queue');
|
|
||||||
$table->longText('payload');
|
|
||||||
$table->longText('exception');
|
|
||||||
$table->timestamp('failed_at')->useCurrent();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('failed_jobs');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreateMediaTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('media', function (Blueprint $table) {
|
|
||||||
$table->bigIncrements('id');
|
|
||||||
$table->morphs('model');
|
|
||||||
$table->string('collection_name');
|
|
||||||
$table->string('name');
|
|
||||||
$table->string('file_name');
|
|
||||||
$table->string('mime_type')->nullable();
|
|
||||||
$table->string('disk');
|
|
||||||
$table->unsignedBigInteger('size');
|
|
||||||
$table->json('manipulations');
|
|
||||||
$table->json('custom_properties');
|
|
||||||
$table->json('responsive_images');
|
|
||||||
$table->unsignedInteger('order_column')->nullable();
|
|
||||||
$table->nullableTimestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('media');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class TeamworkSetupTables extends Migration
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table( \Config::get( 'teamwork.users_table' ), function ( Blueprint $table )
|
|
||||||
{
|
|
||||||
$table->integer( 'current_team_id' )->unsigned()->nullable();
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
Schema::create( \Config::get( 'teamwork.teams_table' ), function ( Blueprint $table )
|
|
||||||
{
|
|
||||||
$table->increments( 'id' )->unsigned();
|
|
||||||
$table->integer( 'owner_id' )->unsigned()->nullable();
|
|
||||||
$table->string( 'name' );
|
|
||||||
$table->timestamps();
|
|
||||||
} );
|
|
||||||
|
|
||||||
Schema::create( \Config::get( 'teamwork.team_user_table' ), function ( Blueprint $table )
|
|
||||||
{
|
|
||||||
$table->bigInteger( 'user_id' )->unsigned();
|
|
||||||
$table->integer( 'team_id' )->unsigned();
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
$table->foreign( 'user_id' )
|
|
||||||
->references( \Config::get( 'teamwork.user_foreign_key' ) )
|
|
||||||
->on( \Config::get( 'teamwork.users_table' ) )
|
|
||||||
->onUpdate( 'cascade' )
|
|
||||||
->onDelete( 'cascade' );
|
|
||||||
|
|
||||||
$table->foreign( 'team_id' )
|
|
||||||
->references( 'id' )
|
|
||||||
->on( \Config::get( 'teamwork.teams_table' ) )
|
|
||||||
->onDelete( 'cascade' );
|
|
||||||
} );
|
|
||||||
|
|
||||||
Schema::create( \Config::get( 'teamwork.team_invites_table' ), function(Blueprint $table)
|
|
||||||
{
|
|
||||||
$table->increments('id');
|
|
||||||
$table->bigInteger('user_id')->unsigned();
|
|
||||||
$table->integer('team_id')->unsigned();
|
|
||||||
$table->enum('type', ['invite', 'request']);
|
|
||||||
$table->string('email');
|
|
||||||
$table->string('accept_token');
|
|
||||||
$table->string('deny_token');
|
|
||||||
$table->timestamps();
|
|
||||||
$table->foreign( 'team_id' )
|
|
||||||
->references( 'id' )
|
|
||||||
->on( \Config::get( 'teamwork.teams_table' ) )
|
|
||||||
->onDelete( 'cascade' );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table(\Config::get( 'teamwork.users_table' ), function(Blueprint $table)
|
|
||||||
{
|
|
||||||
$table->dropColumn('current_team_id');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::table(\Config::get('teamwork.team_user_table'), function (Blueprint $table) {
|
|
||||||
$table->dropForeign(\Config::get('teamwork.team_user_table').'_user_id_foreign');
|
|
||||||
$table->dropForeign(\Config::get('teamwork.team_user_table').'_team_id_foreign');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::drop(\Config::get('teamwork.team_user_table'));
|
|
||||||
Schema::drop(\Config::get('teamwork.team_invites_table'));
|
|
||||||
Schema::drop(\Config::get('teamwork.teams_table'));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreateActivityLogTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) {
|
|
||||||
$table->bigIncrements('id');
|
|
||||||
$table->string('log_name')->nullable();
|
|
||||||
$table->text('description');
|
|
||||||
$table->unsignedBigInteger('subject_id')->nullable();
|
|
||||||
$table->string('subject_type')->nullable();
|
|
||||||
$table->unsignedBigInteger('causer_id')->nullable();
|
|
||||||
$table->string('causer_type')->nullable();
|
|
||||||
$table->json('properties')->nullable();
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
$table->index('log_name');
|
|
||||||
$table->index(['subject_id', 'subject_type'], 'subject');
|
|
||||||
$table->index(['causer_id', 'causer_type'], 'causer');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user