Вход Регистрация
Файл: src/database/migrations/2016_04_14_191709_create_companies_table.php
Строк: 50
<?php

use IlluminateDatabaseMigrationsMigration;
use 
IlluminateDatabaseSchemaBlueprint;

class 
CreateCompaniesTable extends Migration {

    
/**
     * Run the migrations.
     *
     * @return void
     */
    
public function up()
    {
        
Schema::create('Companies', function(Blueprint $table)
        {
            
$table->engine 'InnoDB';
            
$table->increments('CompanyID');
            
$table->string('Title',45);
            
$table->string('Address1',45);
            
$table->string('Address2',45);
            
$table->string('ZipCode',45);
            
$table->string('City',45);
            
$table->string('Phone',245);
            
$table->string('ContactPerson',245);
            
$table->string('Email',245);
            
$table->integer('CountryID',false,true);
            
$table->integer('isOwn',false,true)->length(1)->default(0);
            
$table->timestamp("CreatedAt");
            
$table->timestamp("UpdatedAt");
            
$table->timestamp("DeletedAt")->nullable();
        });
    }


    
/**
     * Reverse the migrations.
     *
     * @return void
     */
    
public function down()
    {
    
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
        
Schema::drop('Companies');
    
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
    }

}
Онлайн: 1
Реклама