add shipping rules
This commit is contained in:
@@ -21,7 +21,7 @@ class CreateRevisionsTable extends Migration
|
||||
$table->text('new_value')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(array('revisionable_id', 'revisionable_type'));
|
||||
$table->index(['revisionable_id', 'revisionable_type']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,36 +3,33 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicFamiliesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_families', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_families');
|
||||
}
|
||||
class CreateBotanicFamiliesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_families', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_families');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,37 +3,34 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicGenresTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_genres', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('family_id')->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_genres');
|
||||
}
|
||||
class CreateBotanicGenresTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_genres', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('family_id')->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_genres');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,47 +3,44 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicSpeciesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_species', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('genre_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('genre_name', 50)->nullable();
|
||||
$table->string('subspecies', 50)->nullable();
|
||||
$table->boolean('germination_legal')->nullable();
|
||||
$table->string('pmg', 50)->nullable();
|
||||
$table->string('grow_duration', 50)->nullable();
|
||||
$table->string('vegetative_cycle', 50)->nullable();
|
||||
$table->string('reglementary_status', 50)->nullable();
|
||||
$table->boolean('add_germination')->nullable();
|
||||
$table->boolean('add_life_duration')->nullable();
|
||||
$table->text('add_diseases', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_species');
|
||||
}
|
||||
class CreateBotanicSpeciesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_species', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('genre_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->string('alias', 50)->nullable();
|
||||
$table->string('latin', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('genre_name', 50)->nullable();
|
||||
$table->string('subspecies', 50)->nullable();
|
||||
$table->boolean('germination_legal')->nullable();
|
||||
$table->string('pmg', 50)->nullable();
|
||||
$table->string('grow_duration', 50)->nullable();
|
||||
$table->string('vegetative_cycle', 50)->nullable();
|
||||
$table->string('reglementary_status', 50)->nullable();
|
||||
$table->boolean('add_germination')->nullable();
|
||||
$table->boolean('add_life_duration')->nullable();
|
||||
$table->text('add_diseases', 65535)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_species');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,55 +3,52 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateBotanicVarietiesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_varieties', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('specie_id')->unsigned()->nullable();
|
||||
$table->string('specie_name', 50)->nullable();
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('range', 50)->nullable();
|
||||
$table->string('category', 50)->nullable();
|
||||
$table->string('life_duration', 50)->nullable();
|
||||
$table->string('packaging', 50)->nullable();
|
||||
$table->string('unit', 50)->nullable();
|
||||
$table->string('characteristics', 50)->nullable();
|
||||
$table->string('nutrition_quality', 50)->nullable();
|
||||
$table->string('production_quality', 50)->nullable();
|
||||
$table->string('size', 50)->nullable();
|
||||
$table->string('maturity', 50)->nullable();
|
||||
$table->string('rusticity', 50)->nullable();
|
||||
$table->string('color', 50)->nullable();
|
||||
$table->string('usage', 50)->nullable();
|
||||
$table->string('pot_culture', 50)->nullable();
|
||||
$table->string('color_type', 50)->nullable();
|
||||
$table->string('plant', 50)->nullable();
|
||||
$table->text('description_2', 65535)->nullable();
|
||||
$table->text('genre', 65535)->nullable();
|
||||
$table->text('specie_latin')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_varieties');
|
||||
}
|
||||
class CreateBotanicVarietiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('botanic_varieties', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('specie_id')->unsigned()->nullable();
|
||||
$table->string('specie_name', 50)->nullable();
|
||||
$table->string('name', 100)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
$table->string('range', 50)->nullable();
|
||||
$table->string('category', 50)->nullable();
|
||||
$table->string('life_duration', 50)->nullable();
|
||||
$table->string('packaging', 50)->nullable();
|
||||
$table->string('unit', 50)->nullable();
|
||||
$table->string('characteristics', 50)->nullable();
|
||||
$table->string('nutrition_quality', 50)->nullable();
|
||||
$table->string('production_quality', 50)->nullable();
|
||||
$table->string('size', 50)->nullable();
|
||||
$table->string('maturity', 50)->nullable();
|
||||
$table->string('rusticity', 50)->nullable();
|
||||
$table->string('color', 50)->nullable();
|
||||
$table->string('usage', 50)->nullable();
|
||||
$table->string('pot_culture', 50)->nullable();
|
||||
$table->string('color_type', 50)->nullable();
|
||||
$table->string('plant', 50)->nullable();
|
||||
$table->text('description_2', 65535)->nullable();
|
||||
$table->text('genre', 65535)->nullable();
|
||||
$table->text('specie_latin')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('botanic_varieties');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,32 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateFailedJobsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('id', true)->unsigned();
|
||||
$table->text('connection', 65535);
|
||||
$table->text('queue', 65535);
|
||||
$table->text('payload');
|
||||
$table->text('exception');
|
||||
$table->timestamp('failed_at')->default(DB::raw('CURRENT_TIMESTAMP'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('failed_jobs');
|
||||
}
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->bigInteger('id', true)->unsigned();
|
||||
$table->text('connection', 65535);
|
||||
$table->text('queue', 65535);
|
||||
$table->text('payload');
|
||||
$table->text('exception');
|
||||
$table->timestamp('failed_at')->default(DB::raw('CURRENT_TIMESTAMP'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('failed_jobs');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,32 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateMailLogsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('mail_logs', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('sent_to')->nullable();
|
||||
$table->text('data', 65535);
|
||||
$table->text('route', 65535);
|
||||
$table->text('event', 65535);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('mail_logs');
|
||||
}
|
||||
class CreateMailLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('mail_logs', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('sent_to')->nullable();
|
||||
$table->text('data', 65535);
|
||||
$table->text('route', 65535);
|
||||
$table->text('event', 65535);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('mail_logs');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
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->dateTime('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
}
|
||||
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->dateTime('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('password_resets');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePermissionRoleTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permission_role', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign');
|
||||
$table->primary(['permission_id','role_id']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permission_role');
|
||||
}
|
||||
class CreatePermissionRoleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permission_role', function (Blueprint $table) {
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned()->index('permission_role_role_id_foreign');
|
||||
$table->primary(['permission_id', 'role_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permission_role');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePermissionUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permission_user', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->string('user_type');
|
||||
$table->primary(['permission_id','user_id','user_type']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permission_user');
|
||||
}
|
||||
class CreatePermissionUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permission_user', function (Blueprint $table) {
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->string('user_type');
|
||||
$table->primary(['permission_id', 'user_id', 'user_type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permission_user');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePermissionsCategoriesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions_categories', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permissions_categories');
|
||||
}
|
||||
class CreatePermissionsCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permissions_categories');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,32 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePermissionsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('category_id')->unsigned()->nullable()->index('permissions_category_id_foreign');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permissions');
|
||||
}
|
||||
class CreatePermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('permissions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id')->unsigned()->nullable()->index('permissions_category_id_foreign');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('permissions');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateRoleUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('role_user', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('user_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned()->index('role_user_role_id_foreign');
|
||||
$table->string('user_type');
|
||||
$table->primary(['user_id','role_id','user_type']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('role_user');
|
||||
}
|
||||
class CreateRoleUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('role_user', function (Blueprint $table) {
|
||||
$table->bigInteger('user_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned()->index('role_user_role_id_foreign');
|
||||
$table->string('user_type');
|
||||
$table->primary(['user_id', 'role_id', 'user_type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('role_user');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateRolesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('roles', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('roles');
|
||||
}
|
||||
class CreateRolesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('roles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
$table->string('display_name')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('roles');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributeFamiliesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_families', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('id', true);
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_families');
|
||||
}
|
||||
class CreateShopArticleAttributeFamiliesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_families', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_families');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributeValuesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_values', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('attribute_family_id')->unsigned()->nullable();
|
||||
$table->boolean('type_value')->nullable()->comment('1 = INT, 2 = DECIMAL, 3 = STRING');
|
||||
$table->string('value', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_values');
|
||||
}
|
||||
class CreateShopArticleAttributeValuesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attribute_values', function (Blueprint $table) {
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('attribute_family_id')->unsigned()->nullable();
|
||||
$table->boolean('type_value')->nullable()->comment('1 = INT, 2 = DECIMAL, 3 = STRING');
|
||||
$table->string('value', 50)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attribute_values');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleAttributesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attributes', function(Blueprint $table)
|
||||
{
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('attribute_value_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attributes');
|
||||
}
|
||||
class CreateShopArticleAttributesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_attributes', function (Blueprint $table) {
|
||||
$table->integer('id')->unsigned()->nullable();
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('attribute_value_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_attributes');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleCategoriesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_categories', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_categories');
|
||||
}
|
||||
class CreateShopArticleCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_categories');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticleComponentsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_components', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->string('model')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_components');
|
||||
}
|
||||
class CreateShopArticleComponentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_components', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_id')->unsigned()->nullable();
|
||||
$table->string('model')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_components');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticlePricesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_prices', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('article_attribute_id')->unsigned()->nullable();
|
||||
$table->decimal('price', 10)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_prices');
|
||||
}
|
||||
class CreateShopArticlePricesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_article_prices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('article_attribute_id')->unsigned()->nullable();
|
||||
$table->decimal('price', 10)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_article_prices');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopArticlesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_articles', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_articles');
|
||||
}
|
||||
class CreateShopArticlesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_articles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_articles');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopCategoriesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_categories', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_categories');
|
||||
}
|
||||
class CreateShopCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
$table->string('name', 50)->nullable();
|
||||
$table->text('description', 65535)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_categories');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,39 +3,36 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopCustomersTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_customers', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->uuid('uuid')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->dateTime('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('remember_token', 100)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_customers');
|
||||
}
|
||||
class CreateShopCustomersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_customers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->uuid('uuid')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->dateTime('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('remember_token', 100)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_customers');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,42 +3,39 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopInvoiceItemsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoice_items', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('invoice_id')->nullable();
|
||||
$table->integer('product_id')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->decimal('unit_price', 10);
|
||||
$table->integer('tax_id')->nullable();
|
||||
$table->integer('raw_price')->nullable();
|
||||
$table->integer('tax')->nullable();
|
||||
$table->integer('total_price')->nullable();
|
||||
$table->decimal('discount_percent')->nullable();
|
||||
$table->decimal('discount')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoice_items');
|
||||
}
|
||||
class CreateShopInvoiceItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoice_items', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('invoice_id')->nullable();
|
||||
$table->integer('product_id')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->decimal('unit_price', 10);
|
||||
$table->integer('tax_id')->nullable();
|
||||
$table->integer('raw_price')->nullable();
|
||||
$table->integer('tax')->nullable();
|
||||
$table->integer('total_price')->nullable();
|
||||
$table->decimal('discount_percent')->nullable();
|
||||
$table->decimal('discount')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoice_items');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,37 +3,34 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopInvoicesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoices', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->boolean('status_id');
|
||||
$table->decimal('subtotal', 10);
|
||||
$table->decimal('total', 10);
|
||||
$table->decimal('shipping', 10);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoices');
|
||||
}
|
||||
class CreateShopInvoicesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_invoices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->boolean('status_id');
|
||||
$table->decimal('subtotal', 10);
|
||||
$table->decimal('total', 10);
|
||||
$table->decimal('shipping', 10);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_invoices');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopOrderPaymentsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_order_payments', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_order_payments');
|
||||
}
|
||||
class CreateShopOrderPaymentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_order_payments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('order_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_order_payments');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopOrdersTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_orders', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_orders');
|
||||
}
|
||||
class CreateShopOrdersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_orders', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_orders');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTaggingTagGroupsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tagging_tag_groups', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('slug', 125)->index();
|
||||
$table->string('name', 125);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tag_groups');
|
||||
}
|
||||
class CreateTaggingTagGroupsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tagging_tag_groups', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('slug', 125)->index();
|
||||
$table->string('name', 125);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tag_groups');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,34 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTaggingTaggedTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tagging_tagged', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('taggable_id')->unsigned()->index();
|
||||
$table->string('taggable_type', 125)->index();
|
||||
$table->string('tag_name', 125);
|
||||
$table->string('tag_slug', 125)->index();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tagged');
|
||||
}
|
||||
class CreateTaggingTaggedTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tagging_tagged', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('taggable_id')->unsigned()->index();
|
||||
$table->string('taggable_type', 125)->index();
|
||||
$table->string('tag_name', 125);
|
||||
$table->string('tag_slug', 125)->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tagged');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,32 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTaggingTagsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
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(0);
|
||||
$table->integer('count')->unsigned()->default(0);
|
||||
$table->integer('tag_group_id')->unsigned()->nullable()->index('tagging_tags_tag_group_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tags');
|
||||
}
|
||||
class CreateTaggingTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
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(0);
|
||||
$table->integer('count')->unsigned()->default(0);
|
||||
$table->integer('tag_group_id')->unsigned()->nullable()->index('tagging_tags_tag_group_id_foreign');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tagging_tags');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,37 +3,34 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTeamInvitesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('team_invites', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->bigInteger('user_id')->unsigned();
|
||||
$table->integer('team_id')->unsigned()->index('team_invites_team_id_foreign');
|
||||
$table->enum('type', array('invite','request'));
|
||||
$table->string('email');
|
||||
$table->string('accept_token');
|
||||
$table->string('deny_token');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('team_invites');
|
||||
}
|
||||
class CreateTeamInvitesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('team_invites', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->bigInteger('user_id')->unsigned();
|
||||
$table->integer('team_id')->unsigned()->index('team_invites_team_id_foreign');
|
||||
$table->enum('type', ['invite', 'request']);
|
||||
$table->string('email');
|
||||
$table->string('accept_token');
|
||||
$table->string('deny_token');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('team_invites');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,32 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTeamUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('team_user', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('user_id')->unsigned()->index('team_user_user_id_foreign');
|
||||
$table->integer('team_id')->unsigned()->index('team_user_team_id_foreign');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('team_user');
|
||||
}
|
||||
class CreateTeamUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('team_user', function (Blueprint $table) {
|
||||
$table->bigInteger('user_id')->unsigned()->index('team_user_user_id_foreign');
|
||||
$table->integer('team_id')->unsigned()->index('team_user_team_id_foreign');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('team_user');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTeamsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('teams', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->integer('owner_id')->unsigned()->nullable();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('teams');
|
||||
}
|
||||
class CreateTeamsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('teams', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('owner_id')->unsigned()->nullable();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('teams');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,43 +3,40 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateUsersTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('id', true)->unsigned();
|
||||
$table->boolean('active')->default(0);
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->dateTime('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('remember_token', 100)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->boolean('verified')->default(0);
|
||||
$table->string('verification_token')->nullable();
|
||||
$table->integer('current_team_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->bigInteger('id', true)->unsigned();
|
||||
$table->boolean('active')->default(0);
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->dateTime('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('remember_token', 100)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->dateTime('last_login')->nullable();
|
||||
$table->boolean('verified')->default(0);
|
||||
$table->string('verification_token')->nullable();
|
||||
$table->integer('current_team_id')->unsigned()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('users');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToCategorizablesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('categorizables', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('category_id')->references('id')->on('categories')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('categorizables', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('categorizables_category_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToCategorizablesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('categorizables', function (Blueprint $table) {
|
||||
$table->foreign('category_id')->references('id')->on('categories')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('categorizables', function (Blueprint $table) {
|
||||
$table->dropForeign('categorizables_category_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToPermissionRoleTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permission_role', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permission_role', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('permission_role_permission_id_foreign');
|
||||
$table->dropForeign('permission_role_role_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToPermissionRoleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permission_role', function (Blueprint $table) {
|
||||
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permission_role', function (Blueprint $table) {
|
||||
$table->dropForeign('permission_role_permission_id_foreign');
|
||||
$table->dropForeign('permission_role_role_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToPermissionUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permission_user', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permission_user', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('permission_user_permission_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToPermissionUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permission_user', function (Blueprint $table) {
|
||||
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permission_user', function (Blueprint $table) {
|
||||
$table->dropForeign('permission_user_permission_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToPermissionsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permissions', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('category_id')->references('id')->on('permissions_categories')->onUpdate('RESTRICT')->onDelete('SET NULL');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permissions', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('permissions_category_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToPermissionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->foreign('category_id')->references('id')->on('permissions_categories')->onUpdate('RESTRICT')->onDelete('SET NULL');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('permissions', function (Blueprint $table) {
|
||||
$table->dropForeign('permissions_category_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToRoleUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('role_user', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('role_user', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('role_user_role_id_foreign');
|
||||
$table->dropForeign('role_user_user_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToRoleUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('role_user', function (Blueprint $table) {
|
||||
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('role_user', function (Blueprint $table) {
|
||||
$table->dropForeign('role_user_role_id_foreign');
|
||||
$table->dropForeign('role_user_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToTaggingTagsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tagging_tags', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tagging_tags', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('tagging_tags_tag_group_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToTaggingTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tagging_tags', function (Blueprint $table) {
|
||||
$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups')->onUpdate('RESTRICT')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tagging_tags', function (Blueprint $table) {
|
||||
$table->dropForeign('tagging_tags_tag_group_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,29 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToTeamInvitesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('team_invites', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('team_invites', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('team_invites_team_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToTeamInvitesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('team_invites', function (Blueprint $table) {
|
||||
$table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('team_invites', function (Blueprint $table) {
|
||||
$table->dropForeign('team_invites_team_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,31 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddForeignKeysToTeamUserTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('team_user', function(Blueprint $table)
|
||||
{
|
||||
$table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('team_user', function(Blueprint $table)
|
||||
{
|
||||
$table->dropForeign('team_user_team_id_foreign');
|
||||
$table->dropForeign('team_user_user_id_foreign');
|
||||
});
|
||||
}
|
||||
class AddForeignKeysToTeamUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('team_user', function (Blueprint $table) {
|
||||
$table->foreign('team_id')->references('id')->on('teams')->onUpdate('RESTRICT')->onDelete('CASCADE');
|
||||
$table->foreign('user_id')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('team_user', function (Blueprint $table) {
|
||||
$table->dropForeign('team_user_team_id_foreign');
|
||||
$table->dropForeign('team_user_user_id_foreign');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateActivityLogTable extends Migration
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCommentsTable extends Migration
|
||||
{
|
||||
@@ -28,4 +28,4 @@ class CreateCommentsTable extends Migration
|
||||
{
|
||||
Schema::dropIfExists('comments');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMediaTable extends Migration
|
||||
{
|
||||
|
||||
@@ -3,36 +3,33 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateShopHomepagesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_homepages', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->text('text');
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_homepages');
|
||||
}
|
||||
class CreateShopHomepagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shop_homepages', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->text('text');
|
||||
$table->unsignedSmallInteger('created_by')->nullable();
|
||||
$table->unsignedSmallInteger('updated_by')->nullable();
|
||||
$table->unsignedSmallInteger('deleted_by')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('shop_homepages');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Kalnoy\Nestedset\NestedSet;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Kalnoy\Nestedset\NestedSet;
|
||||
|
||||
class CreateCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
@@ -33,8 +31,6 @@ class CreateCategoriesTable extends Migration
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCategorizablesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
@@ -24,14 +22,12 @@ class CreateCategorizablesTable extends Migration
|
||||
// Indexes
|
||||
$table->unique(['category_id', 'categorizable_id', 'categorizable_type'], 'categorizables_ids_type_unique');
|
||||
$table->foreign('category_id')->references('id')->on(config('rinvex.categories.tables.categories'))
|
||||
->onDelete('cascade')->onUpdate('cascade');
|
||||
->onDelete('cascade')->onUpdate('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTagsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
@@ -33,8 +31,6 @@ class CreateTagsTable extends Migration
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTaggablesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
@@ -24,14 +22,12 @@ class CreateTaggablesTable extends Migration
|
||||
// Indexes
|
||||
$table->unique(['tag_id', 'taggable_id', 'taggable_type'], 'taggables_ids_type_unique');
|
||||
$table->foreign('tag_id')->references('id')->on(config('rinvex.tags.tables.tags'))
|
||||
->onDelete('cascade')->onUpdate('cascade');
|
||||
->onDelete('cascade')->onUpdate('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user