Gitlab@Informatics

Skip to content
Snippets Groups Projects
Select Git revision
  • 65b00a8865061053e30a0a00b3421647db8cbe61
  • main default protected
  • revert
  • 64160159
  • 64160292
  • 64160073
  • html-v_page
  • 64160174
  • 64160072
  • 64160295
  • production
11 results

Dockerfile

Blame
  • 2023_04_06_033755_member.php 3.38 KiB
    <?php
    
    use Illuminate\Database\Migrations\Migration;
    use Illuminate\Database\Schema\Blueprint;
    use Illuminate\Support\Facades\Schema;
    use Illuminate\Support\Facades\DB;
    
    return new class extends Migration
    {
        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up()
        {
            Schema::create('Member', function (Blueprint $table){
                $table->id();
                $table->string('mem_id_card');
                $table->string('mem_prefix_th')->nullable();
                $table->string('mem_prefix_en')->nullable();
                $table->string('mem_fname_th')->nullable();
                $table->string('mem_fname_en')->nullable();
                $table->string('mem_lname_th')->nullable();
                $table->string('mem_lname_en')->nullable();
                $table->date('mem_birthday')->nullable();
                $table->string('mem_lawyer_type')->nullable();
                $table->string('mem_license')->nullable();
                $table->string('mem_lawyer_affiliation')->nullable();
                $table->string('mem_lawyer_relation')->nullable();
                $table->string('mem_email')->unique()->nullable();
                $table->string('mem_phone_number', 10)->nullable();
                $table->integer('mem_type')->default(1);
                $table->integer('mem_status')->default(0);
                $table->integer('mem_balance')->nullable();
                $table->string('password')->nullable();
                $table->string('address_id')->nullable();
                $table->timestamps();
            });
            DB::table('Member')->insert([
                [
                    'mem_id_card' => '123456789',
                    'mem_prefix_th' => 'นาย',
                    'mem_prefix_en' => 'Mr.',
                    'mem_prefix_th' => 'นาย',
                    'mem_fname_th' => 'แอดมิน',
                    'mem_fname_en' => 'admin',
                    'mem_lname_th' => 'admin',
                    'mem_lname_en' => 'admin',
                    'mem_lawyer_type' => '1',
                    'mem_type' => '0',
                    'mem_status' => '1',
                    'mem_birthday' => '2023-5-1',
                    'mem_license' => 'aaa',
                    'mem_lawyer_affiliation' => 'aaaa',
                    'mem_lawyer_relation' => 'aaa',
                    'mem_email' => 'admin@ivsoft.com',
                    'mem_phone_number' => '09999999',
                    'password' => 'admin',
                    'address_id' => '1'
    
                ],
                [
                    'mem_id_card' => '1234567890',
                    'mem_prefix_th' => 'นาย',
                    'mem_prefix_en' => 'Mr.',
                    'mem_prefix_th' => 'นาย',
                    'mem_fname_th' => 'user',
                    'mem_fname_en' => 'user',
                    'mem_lname_th' => 'user',
                    'mem_lname_en' => 'user',
                    'mem_lawyer_type' => '1',
                    'mem_type' => '0',
                    'mem_status' => '0',
                    'mem_birthday' => '2023-5-1',
                    'mem_license' => 'aaa',
                    'mem_lawyer_affiliation' => 'aaaa',
                    'mem_lawyer_relation' => 'aaa',
                    'mem_email' => 'user@ivsoft.com',
                    'mem_phone_number' => '09999999',
                    'password' => 'user',
                    'address_id' => '2'
    
                ],
    
            ]);
        }
    
    
    
        /**
         * Reverse the migrations.
         *
         * @return void
         */
        public function down()
        {
            Schema::dropIfExists('Member');
        }
    };