Small fix
This commit is contained in:
miroman-afk
2022-01-20 12:03:19 +03:00
parent 104017ed96
commit cf997da7ec
10 changed files with 166 additions and 12 deletions

View File

@@ -10,11 +10,9 @@ class AddValueToExchangeActionsTable extends Migration {
* @return void
*/
public function up() {
if (!Schema::hasColumn('exchange_actions', 'value')) {
Schema::table('exchange_actions', function (Blueprint $table) {
$table->string('value', 255)->nullable()->change();
});
}
Schema::table('exchange_actions', function (Blueprint $table) {
$table->string('value', 255)->nullable()->change();
});
}
/**

View File

@@ -0,0 +1,53 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Log;
class DeleteFrontendFolders extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
function dirDel($dir) {
$d = opendir($dir);
while (($entry = readdir($d)) !== false) {
if ($entry != "." && $entry != "..") {
if (is_dir($dir . "/" . $entry)) {
dirDel($dir . "/" . $entry);
} else {
unlink($dir . "/" . $entry);
}
}
}
closedir($d);
rmdir($dir);
}
if (file_exists(CORE_PATH . '/../Client/web/')) {
dirDel(CORE_PATH . '/../Client/web/');
} else {
Log::debug('Client frontend already deleted!');
}
if (file_exists(CORE_PATH . '/../Shift/web/')) {
dirDel(CORE_PATH . '/../Shift/web/');
} else {
Log::debug('Shift frontend already deleted!');
}
if (file_exists(CORE_PATH . '/../Report/web/')) {
dirDel(CORE_PATH . '/../Report/web/');
} else {
Log::debug('Report frontend already deleted!');
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
//
}
}

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateValueInShiftOnlineActions extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->string('value', 255)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->string('value', 50)->nullable()->change();
});
}
}

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateMoreInShiftOnlineActions extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->string('more', 255)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('shift_online_actions', function (Blueprint $table) {
$table->string('more', 50)->nullable()->change();
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateShiftOnlineModificatorsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
if (!Schema::hasTable('shift_online_modificators')) {
Schema::create('shift_online_modificators', function (Blueprint $table) {
$table->id();
$table->integer('code')->nullable();
$table->string('name', 255)->nullable();
$table->integer('item_id')->nullable();
$table->integer('shift_id')->nullable();
$table->integer('terminal_id')->nullable();
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('shift_online_modificators', function (Blueprint $table) {
//
});
}
}