Skip to content

Commit

Permalink
test support mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Sep 3, 2017
1 parent 9cdd28e commit 8f8b432
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,35 @@ class CreateOrchidPostTable extends Migration
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->string('type');
$table->string('status')->nullable();
$table->jsonb('content');
$table->jsonb('options');
$table->string('slug', '255')->unique();
$table->timestamp('publish_at');
$table->timestamps();
$table->softDeletes();
$table->index(['status', 'type']);
});
try {
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->string('type');
$table->string('status')->nullable();
$table->jsonb('content');
$table->jsonb('options');
$table->string('slug', '255')->unique();
$table->timestamp('publish_at');
$table->timestamps();
$table->softDeletes();
$table->index(['status', 'type']);
});
}catch (\Exception $exception){
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->string('type');
$table->string('status')->nullable();
$table->text('content');
$table->text('options');
$table->string('slug', '255')->unique();
$table->timestamp('publish_at');
$table->timestamps();
$table->softDeletes();
$table->index(['status', 'type']);
});
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ class CreateOrchidTermsTable extends Migration
*/
public function up()
{
Schema::create('terms', function (Blueprint $table) {
$table->increments('id');
$table->string('slug')->unique();
$table->jsonb('content');
$table->integer('term_group')->default(0);
$table->timestamps();
});
try {
Schema::create('terms', function (Blueprint $table) {
$table->increments('id');
$table->string('slug')->unique();
$table->jsonb('content');
$table->integer('term_group')->default(0);
$table->timestamps();
});
}catch (\Exception $exception){
Schema::create('terms', function (Blueprint $table) {
$table->increments('id');
$table->string('slug')->unique();
$table->text('content');
$table->integer('term_group')->default(0);
$table->timestamps();
});
}
}

/**
Expand Down

0 comments on commit 8f8b432

Please sign in to comment.