first commit

This commit is contained in:
kizzroyal
2022-02-16 14:01:00 +07:00
commit f876f79060
294 changed files with 92083 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLichSuAttendanceDate extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lich_su_attendance_date', function (Blueprint $table) {
$table->id();
$table->date('date')->nullable();
$table->string('phone')->nullable();
$table->integer('mocchoi')->nullable();
$table->integer('tiennhan')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lich_su_attendance_date');
}
}

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAttendanceDateSettingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('attendance_date_setting', function(Blueprint $table) {
$table->id();
$table->integer('mocchoi')->nullable();
$table->integer('tiennhan')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('attendance_date_setting');
}
}

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnOnDiemdanhNgayForSettingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!Schema::hasColumn('settings', 'on_diemdanh_ngay')) {
Schema::table('settings', function(Blueprint $table) {
$table->tinyInteger('on_diemdanh_ngay')->after('on_diemdanh')->default(1);
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasColumn('settings', 'on_diemdanh_ngay')) {
Schema::table('settings', function(Blueprint $table) {
$table->dropColumn('on_diemdanh_ngay');
});
}
}
}