v.2.4 RestoreShift

This commit is contained in:
miroman-afk
2022-01-10 02:28:28 +03:00
parent 7438ebef78
commit 0209970fe1
13 changed files with 306 additions and 5 deletions

View File

@@ -0,0 +1,63 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnsToShiftOnlineOrders extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::table('shift_online_orders', function (Blueprint $table) {
$table->integer('is_self')->nullable();
$table->integer('is_block')->nullable();
$table->integer('is_edit')->nullable();
$table->string('guid')->nullable();
});
Schema::table('shift_online_items', function (Blueprint $table) {
$table->decimal('count_real', $precision = 16, $scale = 2)->nullable();
$table->decimal('count_return', $precision = 16, $scale = 2)->nullable();
$table->integer('parent_id')->nullable();
});
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->integer('terminal_id')->nullable();
});
Schema::table('exchange_orders', function (Blueprint $table) {
$table->string('table_place')->nullable();
});
Schema::table('exchange_items', function (Blueprint $table) {
$table->integer('modificator_code')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('shift_online_orders', function (Blueprint $table) {
$table->dropColumn('is_self');
$table->dropColumn('guid');
$table->dropColumn('is_block');
$table->dropColumn('is_edit');
});
Schema::table('shift_online_items', function (Blueprint $table) {
$table->dropColumn('count_real');
$table->dropColumn('count_return');
$table->dropColumn('parent_id');
});
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->dropColumn('terminal_id');
});
Schema::table('exchange_orders', function (Blueprint $table) {
$table->dropColumn('table_place');
});
Schema::table('exchange_items', function (Blueprint $table) {
$table->dropColumn('modificator_code');
});
}
}