本文整理汇总了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();
});
}
示例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');
});
}
示例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();
});
}
示例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');
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}
示例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();
});
}