File "2017_10_23_201030_create_app_settings_table.php"

Full path: /home/qooetu/costes.qooetu.com/database/migrations/2017_10_23_201030_create_app_settings_table.php
File size: 2.51 B (2.51 KB bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppSettingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_settings', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('value');
            $table->text('description');
            $table->timestamps();
            $table->softDeletes();
        });

         DB::table('app_settings')->insert([
            'name'=>'PBC Optional Work Input',
            'value'=>'Yes',
            'description'=>'This Option Allow/does not allow the input of independent PBC works other than six major labour based works',
            'created_at'=>date('Y-m-d H:i:s'),
            'updated_at'=>date('Y-m-d H:i:s'),
            ]);


           DB::table('app_settings')->insert([
            'name'=>'Instructed Work Input',
            'value'=>'Yes',
            'description'=>'This option allow/does not allow the input of instruced works',
            'created_at'=>date('Y-m-d H:i:s'),
            'updated_at'=>date('Y-m-d H:i:s'),
            ]);

            DB::table('app_settings')->insert([
            'name'=>'Select Input Methoid of major labour based works one by No',
            'value'=>'Yes',
            'description'=>'if Yes,users can select input method per work item',
            'created_at'=>date('Y-m-d H:i:s'),
            'updated_at'=>date('Y-m-d H:i:s'),
            ]);

             DB::table('app_settings')->insert([
            'name'=>'Generate PDF',
            'value'=>'Yes',
            'description'=>'Allow the system to generate both PDF and Excel Reports',
            'created_at'=>date('Y-m-d H:i:s'),
            'updated_at'=>date('Y-m-d H:i:s'),
            ]);


              DB::table('app_settings')->insert([
            'name'=>'Operation Mode',
            'value'=>'Advanced',
            'description'=>'Select wether to allow the authority to input their own default settings(Advanced) or (Normal) they can be set by admin.',
            'created_at'=>date('Y-m-d H:i:s'),
            'updated_at'=>date('Y-m-d H:i:s'),
            ]);

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('app_settings');
    }
}