Homparty dev

This commit is contained in:
Kevin Adametz 2020-12-16 20:03:51 +01:00
parent 9252094a04
commit ac0d5b781e
60 changed files with 3443 additions and 293 deletions

View file

@ -48,8 +48,6 @@ class CreateShoppingOrdersTable extends Migration
$table->string('tracking', 255)->nullable();
$table->char('mode', 4)->nullable();
$table->timestamps();

View file

@ -27,7 +27,6 @@ class CreateShoppingOrderItemsTable extends Migration
$table->decimal('price', 8, 2)->nullable();
$table->decimal('price_net', 8, 3)->nullable();
$table->decimal('tax_rate', 5, 2)->nullable();
$table->string('slug')->nullable();

View file

@ -28,6 +28,9 @@ class CreateHomepartiesTable extends Migration
$table->boolean('active')->default(false);
$table->boolean('default')->default(false);
$table->string('token')->nullable();
$table->boolean('token_active')->default(true);
$table->timestamps();
});
}

View file

@ -51,9 +51,6 @@ class CreateHomepartyUsersTable extends Migration
$table->boolean('has_buyed')->default(false);
$table->boolean('subscribed')->default(false);
$table->string('token')->nullable();
$table->boolean('token_active')->default(true);
$table->text('notice')->nullable();
$table->char('mode', 4)->nullable();

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIngredientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ingredients', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->index();
$table->text('trans_name')->nullable();
$table->text('inci')->nullable();
$table->mediumText('trans_inci')->nullable();
$table->text('effect')->nullable();
$table->mediumText('trans_effect')->nullable();
$table->boolean('active')->default(false);
$table->unsignedTinyInteger('pos')->nullable()->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ingredients');
}
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductIngredientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_ingredients', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('product_id')->index();
$table->unsignedInteger('ingredient_id')->index();
$table->timestamps();
$table->foreign('product_id')
->references('id')
->on('products');
$table->foreign('ingredient_id')
->references('id')
->on('ingredients')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_ingredients');
}
}