user shop sites

This commit is contained in:
Kevin Adametz 2019-02-07 17:25:43 +01:00
parent 22a2b4710a
commit dc857e88d5
37 changed files with 2044 additions and 869 deletions

View file

@ -21,16 +21,17 @@ class CreateUserShopsTable extends Migration
$table->string('slug', 40)->unique()->index();
$table->boolean('active')->default(false);
$table->boolean('set_defaults')->default(false);
$table->timestamp('active_date')->nullable();
$table->string('title')->nullable();
$table->text('trans_title')->nullable();
$table->text('copy')->nullable();
$table->mediumText('trans_copy')->nullable();
$table->string('contact')->nullable();
$table->text('info')->nullable();
$table->mediumText('trans_info')->nullable();
$table->string('accessibility')->nullable();
$table->string('about')->nullable();
$table->string('featured')->nullable();
@ -47,7 +48,6 @@ class CreateUserShopsTable extends Migration
->references('id')
->on('users')
->onDelete('cascade');
});
}

View file

@ -0,0 +1,47 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserShopOnSitesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_shop_on_sites', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_shop_id')->index();
$table->string('filename')->nullable();
$table->string('originalname')->nullable();
$table->string('ext')->nullable();
$table->string('mine')->nullable();
$table->unsignedInteger('size')->nullable();
$table->string('slug')->unique()->index();
$table->timestamps();
$table->foreign('user_shop_id')
->references('id')
->on('user_shops')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_shop_on_sites');
}
}