mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Explicitly specify length for string columns.
The missing length attributes caused problems with too long indices.
This commit is contained in:
parent
5b5a213143
commit
0f8968ee63
|
@ -14,7 +14,7 @@ class CreateAccessTokensTable extends Migration {
|
|||
{
|
||||
Schema::create('access_tokens', function(Blueprint $table)
|
||||
{
|
||||
$table->string('id');
|
||||
$table->string('id', 100);
|
||||
$table->integer('user_id')->unsigned();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class CreateActivityTable extends Migration {
|
|||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('sender_id')->unsigned()->nullable();
|
||||
$table->string('type');
|
||||
$table->string('type', 100);
|
||||
$table->binary('data')->nullable();
|
||||
$table->dateTime('time');
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@ class CreateConfigTable extends Migration {
|
|||
{
|
||||
Schema::create('config', function(Blueprint $table)
|
||||
{
|
||||
$table->string('key')->primary();
|
||||
$table->string('key', 100)->primary();
|
||||
$table->binary('value')->nullable();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class CreateDiscussionsTable extends Migration {
|
|||
Schema::create('discussions', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('title');
|
||||
$table->string('title', 200);
|
||||
$table->integer('comments_count')->unsigned()->default(0);
|
||||
$table->integer('number_index')->unsigned()->default(0);
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ class CreateGroupsTable extends Migration
|
|||
{
|
||||
Schema::create('groups', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name_singular');
|
||||
$table->string('name_plural');
|
||||
$table->string('color')->nullable();
|
||||
$table->string('icon')->nullable();
|
||||
$table->string('name_singular', 100);
|
||||
$table->string('name_plural', 100);
|
||||
$table->string('color', 20)->nullable();
|
||||
$table->string('icon', 100)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ class CreateNotificationsTable extends Migration {
|
|||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('sender_id')->unsigned()->nullable();
|
||||
$table->string('type');
|
||||
$table->string('subject_type')->nullable();
|
||||
$table->string('type', 100);
|
||||
$table->string('subject_type', 200)->nullable();
|
||||
$table->integer('subject_id')->unsigned()->nullable();
|
||||
$table->binary('data')->nullable();
|
||||
$table->dateTime('time');
|
||||
|
|
|
@ -20,7 +20,7 @@ class CreatePostsTable extends Migration {
|
|||
|
||||
$table->dateTime('time');
|
||||
$table->integer('user_id')->unsigned()->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('type', 100)->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->text('content_html')->nullable();
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ class CreateUsersTable extends Migration {
|
|||
Schema::create('users', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('username')->unique();
|
||||
$table->string('email')->unique();
|
||||
$table->string('username', 100)->unique();
|
||||
$table->string('email', 150)->unique();
|
||||
$table->boolean('is_confirmed')->default(0);
|
||||
$table->string('confirmation_token')->nullable();
|
||||
$table->string('confirmation_token', 50)->nullable();
|
||||
$table->boolean('is_activated')->default(0);
|
||||
$table->string('password');
|
||||
$table->string('password', 100);
|
||||
$table->text('bio')->nullable();
|
||||
$table->text('bio_html')->nullable();
|
||||
$table->string('avatar_path')->nullable();
|
||||
$table->string('avatar_path', 100)->nullable();
|
||||
$table->binary('preferences')->nullable();
|
||||
$table->dateTime('join_time')->nullable();
|
||||
$table->dateTime('last_seen_time')->nullable();
|
||||
|
|
Loading…
Reference in New Issue
Block a user