First Commit
This commit is contained in:
commit
610aa1e202
4204 changed files with 636764 additions and 0 deletions
59
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
59
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password');
|
||||
|
||||
$table->boolean('confirmed')->default(false);
|
||||
$table->string('confirmation_code', 30)->index()->nullable();
|
||||
$table->timestamp('confirmation_date')->nullable();
|
||||
$table->dateTime('confirmation_code_to')->nullable();
|
||||
$table->unsignedTinyInteger('confirmation_code_remider')->default(0);
|
||||
|
||||
$table->boolean('active')->default(false);
|
||||
$table->timestamp('active_date')->nullable();
|
||||
|
||||
$table->dateTime('agreement')->nullable();
|
||||
|
||||
$table->boolean('admin')->default(false);
|
||||
|
||||
$table->char('lang', 2)->index();
|
||||
|
||||
$table->text('notes')->nullable();
|
||||
|
||||
$table->rememberToken();
|
||||
|
||||
$table->timestamp('last_login')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->softDeletes();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateUserUpdateEmailsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_update_emails', function (Blueprint $table) {
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->string('email')->unique();
|
||||
$table->string('token')->index();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_update_emails');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCountriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('countries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('code', 2)->index();
|
||||
$table->string('phone', 6);
|
||||
$table->string('en', 100)->index();
|
||||
$table->string('de', 100)->index();
|
||||
$table->string('es', 100);
|
||||
$table->string('fr', 100);
|
||||
$table->string('it', 100);
|
||||
$table->string('ru', 100);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAccountsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('accounts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('user_id')->index();
|
||||
|
||||
$table->boolean('company')->default(true);
|
||||
|
||||
$table->string('company_name')->nullable()->index();
|
||||
$table->string('company_street')->nullable();
|
||||
$table->string('company_postal_code')->nullable();
|
||||
$table->string('company_city')->nullable();
|
||||
$table->unsignedInteger('company_pre_phone_id')->nullable();
|
||||
$table->string('company_phone')->nullable();
|
||||
$table->string('company_homepage')->nullable();
|
||||
$table->unsignedInteger('company_country_id')->nullable()->index();
|
||||
|
||||
$table->char('salutation', 2)->nullable();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('first_name')->nullable();
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('street')->nullable();
|
||||
$table->string('postal_code')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
|
||||
$table->unsignedInteger('country_id')->nullable()->index();
|
||||
|
||||
$table->unsignedInteger('pre_phone_id')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
|
||||
$table->unsignedInteger('pre_mobil_id')->nullable();
|
||||
$table->string('mobil')->nullable();
|
||||
|
||||
$table->date('birthday')->nullable();
|
||||
$table->string('website')->nullable();
|
||||
$table->string('facebook')->nullable();
|
||||
$table->string('facebook_fanpage')->nullable();
|
||||
$table->string('instagram')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('accounts');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateAttributesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('attributes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('parent_id')->index()->nullable();
|
||||
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('parent_id')
|
||||
->references('id')
|
||||
->on('attributes');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('attributes');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('parent_id')->index()->nullable();
|
||||
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('parent_id')
|
||||
->references('id')
|
||||
->on('categories');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateProductsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('products', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->string('name')->index();
|
||||
$table->text('trans_name')->nullable();
|
||||
|
||||
$table->string('title')->index();
|
||||
$table->text('trans_title')->nullable();
|
||||
|
||||
$table->text('copy')->nullable();
|
||||
$table->mediumText('trans_copy')->nullable();
|
||||
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
$table->decimal('price_ek', 8, 2)->nullable();
|
||||
$table->decimal('tax', 5, 2)->nullable();
|
||||
|
||||
$table->decimal('price_old', 8, 2)->nullable(); //streichpreis
|
||||
|
||||
$table->string('contents')->nullable();
|
||||
$table->string('number')->nullable();
|
||||
$table->string('icons')->nullable(); //as array cast
|
||||
|
||||
$table->text('description')->nullable();
|
||||
$table->mediumText('trans_description')->nullable();
|
||||
|
||||
$table->text('usage')->nullable();
|
||||
$table->mediumText('trans_usage')->nullable();
|
||||
|
||||
$table->text('ingredients')->nullable();
|
||||
$table->mediumText('trans_ingredients')->nullable();
|
||||
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
$table->unsignedInteger('amount')->nullable(); //for shop
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->softDeletes();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('products');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateProductAttributesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('product_attributes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('product_id')->index();
|
||||
$table->unsignedInteger('attribute_id')->index();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
||||
$table->foreign('attribute_id')
|
||||
->references('id')
|
||||
->on('attributes')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('product_attributes');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateProductCategoriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('product_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('product_id')->index();
|
||||
$table->unsignedInteger('category_id')->index();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products');
|
||||
|
||||
$table->foreign('category_id')
|
||||
->references('id')
|
||||
->on('categories')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('product_categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateProductImagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('product_images', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('product_id')->nullable()->index();
|
||||
|
||||
$table->string('filename')->index();
|
||||
$table->string('original_name')->index();
|
||||
$table->string('ext')->index();
|
||||
$table->string('mine')->index();
|
||||
$table->unsignedInteger('size');
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('product_images');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue