Optimisasi untuk K13 2020
- restriksi untuk print dihilangkan - stempel pada ttd ditambahkann - isi surat disesuaikan - ukuran kertas disesuaikan - data siswa baru ditambahkan
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class CreateK13HasilBelajarsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('k13_hasil_belajars', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('siswa_id');
|
||||
$table->longText('meta');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('siswa_id')
|
||||
->references('id')
|
||||
->on('siswas')
|
||||
->onUpdate('cascade')
|
||||
->onDelete('restrict');
|
||||
});
|
||||
|
||||
// Import data siswa
|
||||
DB::unprepared(file_get_contents(dirname(dirname(__FILE__)).'/imports/siswas_01-05-2020.sql'));
|
||||
|
||||
// Import k13 hasil belajar
|
||||
Artisan::call('ba:import-excel resources/imports/hasil_belajar_ba_1920.xlsx -k k13');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('k13_hasil_belajars');
|
||||
DB::table('siswas')->where('id', '>', '401')->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user