Skip to content

Commit

Permalink
Specific max 190 length for varchar because we are using utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
libern committed Jul 20, 2016
1 parent b3242f2 commit 35bfe34
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function up()
{
Schema::create('oauth_scopes', function (Blueprint $table) {
$table->string('id', 40)->primary();
$table->string('description');
$table->string('description', 190);

$table->timestamps();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function up()
Schema::create('oauth_clients', function (BluePrint $table) {
$table->string('id', 40)->primary();
$table->string('secret', 40);
$table->string('name');
$table->string('name', 190);
$table->timestamps();

$table->unique(['id', 'secret']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function up()
Schema::create('oauth_client_endpoints', function (Blueprint $table) {
$table->increments('id');
$table->string('client_id', 40);
$table->string('redirect_uri');
$table->string('redirect_uri', 190);

$table->timestamps();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function up()
$table->increments('id');
$table->string('client_id', 40);
$table->enum('owner_type', ['client', 'user'])->default('user');
$table->string('owner_id');
$table->string('client_redirect_uri')->nullable();
$table->string('owner_id', 100);
$table->string('client_redirect_uri', 190)->nullable();
$table->timestamps();

$table->index(['client_id', 'owner_type', 'owner_id']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function up()
Schema::create('oauth_auth_codes', function (Blueprint $table) {
$table->string('id', 40)->primary();
$table->integer('session_id')->unsigned();
$table->string('redirect_uri');
$table->string('redirect_uri', 190);
$table->integer('expire_time');

$table->timestamps();
Expand Down
6 changes: 3 additions & 3 deletions database/migrations/2014_10_12_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ public function up()
Schema::create('users', function (Blueprint $table) {
$table->increments('user_id');
$table->unsignedInteger('slid');
$table->string('name');
$table->string('name', 50);
$table->char('gender', 1);
$table->date('birthday');
$table->char('country', 2)->default('US');
$table->string('timezone', 30)->default('UTC');
$table->string('locale', 15)->default('en');
$table->string('username', 50)->nullable();
$table->string('phone_number')->nullable();
$table->string('email')->unique();
$table->string('password');
$table->string('email', 150)->unique();
$table->string('password', 190);
$table->rememberToken();
$table->tinyInteger('status')->default(0);
$table->unsignedInteger('created_by')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class CreatePasswordResetsTable extends Migration
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->string('email', 190)->index();
$table->string('token', 190)->index();
$table->timestamp('created_at');
});
}
Expand Down

0 comments on commit 35bfe34

Please sign in to comment.