当前位置: 首页>>代码示例>>PHP>>正文


PHP Schema::Create方法代码示例

本文整理汇总了PHP中Schema::Create方法的典型用法代码示例。如果您正苦于以下问题:PHP Schema::Create方法的具体用法?PHP Schema::Create怎么用?PHP Schema::Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schema的用法示例。


在下文中一共展示了Schema::Create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('members', function ($table) {
         $table->integer('id')->primary();
         $table->integer('membership_id')->default('N/A');
         $table->string('name')->default('N/A');
         $table->string('father')->default('N/A');
         $table->string('husband')->default('N/A');
         $table->text('village')->default('N/A');
         $table->text('postOffice')->default('N/A');
         $table->text('thana')->default('N/A');
         $table->text('district')->default('N/A');
         $table->text('present_address')->default('N/A');
         $table->text('birthday')->nullable();
         $table->string('phone')->default('N/A');
         $table->string('acknowledgement_name')->default('N/A');
         $table->string('acknowledgement_relationship')->default('N/A');
         $table->text('date_of_enrollment')->default('0');
         $table->integer('roll')->default('N/A');
         $table->text('date_of_past_enrollment')->default('0');
         $table->text('date_of_cancel')->default('0');
         $table->integer('cancel_roll')->default('0');
         $table->integer('status')->default('0');
         $table->text('date_of_membership');
         $table->integer('created_by_id')->default('N/A');
         $table->integer('updated_by_id')->default('N/A');
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:34,代码来源:2014_09_07_162332_member_table.php

示例2: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('exem-emp', function ($table) {
         $table->integer('exemplar')->unsigned();
         $table->foreign('exemplar')->references('id_exemplar')->on('exemplar');
         $table->integer('emprestimo')->unsigned();
         $table->foreign('emprestimo')->references('id_emprestimo')->on('emprestimo');
     });
 }
开发者ID:bening2011,项目名称:GestBiblio-TCC,代码行数:14,代码来源:2015_09_30_223931_exem-emp.php

示例3: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('roles', function ($table) {
         $table->integer('id')->primary();
         $table->string('role')->nullable();
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:15,代码来源:2014_10_17_215838_user_role_tabel.php

示例4: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('usu-emp', function ($table) {
         $table->integer('cliente')->unsigned();
         $table->foreign('cliente')->references('id_cliente')->on('cliente');
         $table->integer('emprestimo')->unsigned();
         $table->foreign('emprestimo')->references('id_emprestimo')->on('emprestimo');
         $table->integer('usuario')->unsigned();
         $table->foreign('usuario')->references('id_usuario')->on('usuario');
     });
 }
开发者ID:bening2011,项目名称:GestBiblio-TCC,代码行数:16,代码来源:2015_09_30_224003_usu-emp.php

示例5: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('users', function ($table) {
         $table->integer('id')->primary();
         $table->string('username', 128)->unique();
         $table->string('password');
         $table->string('email')->unique();
         $table->string('remember_token')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:laracms,代码行数:16,代码来源:2014_08_01_094412_create_users.php

示例6: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('libraries', function ($table) {
         $table->integer('id')->primary();
         $table->string('book_name')->nullable();
         $table->integer('book_copy')->nullable();
         $table->string('book_img_name')->nullable();
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:17,代码来源:2014_09_14_202735_library_table.php

示例7: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('albums', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title', 100);
         $table->string('url', 100)->unique();
         $table->text('short_description');
         $table->text('detail_description');
         $table->enum('status', ['Active', 'Inactive'])->default('Inactive');
         $table->timestamps();
     });
 }
开发者ID:kumarsubedi93,项目名称:laravel_docs,代码行数:17,代码来源:2015_09_10_082212_albums.php

示例8: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('countries', function (Blueprint $table) {
         $table->increments('id');
         $table->string('name', 100);
         $table->string('url', 100)->unique()->comment('it is helping for searching countries');
         $table->text('image');
         $table->text('short_description');
         $table->text('detial_description');
         $table->enum('status', ['Active', 'Inactive'])->default('Inactive');
         $table->timestamps();
     });
 }
开发者ID:kumarsubedi93,项目名称:laravel_docs,代码行数:18,代码来源:2015_09_10_080707_countries.php

示例9: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('hscs', function ($table) {
         $table->integer('id')->primary();
         $table->integer('membership_id')->nullable();
         $table->string('result')->nullable();
         $table->date('year')->nullable();
         $table->string('board')->nullable();
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:18,代码来源:2014_09_07_172143_members_hsc_table.php

示例10: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('masters', function ($table) {
         $table->integer('id')->primary();
         $table->integer('membership_id')->default('N/A');
         $table->string('result')->default('N/A');
         $table->date('year')->default('N/A');
         $table->string('university')->default('N/A');
         $table->integer('created_by_id')->default('N/A');
         $table->integer('updated_by_id')->default('N/A');
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:18,代码来源:2014_09_07_172216_members_masters_table.php

示例11: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('valids', function ($table) {
         $table->integer('id')->primary();
         $table->integer('membership_id')->nullable();
         $table->string('valid')->nullable();
         $table->string('toDate')->nullable();
         $table->string('UpToDate')->nullable();
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:18,代码来源:2014_09_07_191351_valid_members_table.php

示例12: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::DropIfExists('horaires');
     Schema::Create('horaires', function (Blueprint $table) {
         $table->engine = 'InnoDB';
         $table->increments('id');
         $table->date('date');
         $table->time('h_debut');
         $table->time('h_fin');
         $table->integer('matiere_id')->unsigned();
         $table->foreign('matiere_id')->references('id')->on('matieres')->onDelete('cascade');
         $table->timestamps();
     });
 }
开发者ID:HamzaElgarrab,项目名称:Slackerz,代码行数:19,代码来源:2015_12_05_170008_create_table_horaires.php

示例13: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('borrows', function ($table) {
         $table->integer('id')->primary();
         $table->string('membership_id')->nullable();
         $table->string('book_name')->nullable();
         $table->string('borrow_date')->nullable();
         $table->string('return_date')->nullable();
         $table->integer('book_copy')->nullable();
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:19,代码来源:2014_10_17_201913_borrows_table.php

示例14: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('country_id')->unsigned();
         $table->foreign('country_id')->references('id')->on('countries');
         $table->string('name', '100');
         $table->string('url', 100)->unique();
         $table->text('image');
         $table->text('short_description');
         $table->text('detail_description');
         $table->enum('status', ['Active', 'Inactive'])->default('Inactive');
         $table->timestamps();
     });
 }
开发者ID:kumarsubedi93,项目名称:laravel_docs,代码行数:20,代码来源:2015_09_10_080932_categories.php

示例15: up

 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::Create('educations', function ($table) {
         $table->integer('id')->primary();
         $table->integer('membership_id')->nullable();
         $table->string('SSC')->default('N/A');
         $table->string('HSC')->default('N/A');
         $table->string('Hons')->default('N/A');
         $table->string('Masters')->default('N/A');
         $table->string('BarAtLaw')->default('N/A');
         $table->integer('created_by_id')->nullable();
         $table->integer('updated_by_id')->nullable();
         $table->timestamps();
     });
 }
开发者ID:BDMADE,项目名称:DBA,代码行数:20,代码来源:2014_09_07_165311_members_edu_table.php


注:本文中的Schema::Create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。