Merge pull request #57 from jdmcmahan/fix-unique-constraint

Use bigInteger type for app ID columns to avoid overflow
This commit is contained in:
ilumos 2021-08-30 19:28:22 +01:00 committed by GitHub
commit f94fcf3ae6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,13 +44,13 @@ class InitialiseDatabase extends Command
$this->info('Creating empty database tables'); $this->info('Creating empty database tables');
Capsule::schema()->create('steam_apps', function ($table) { Capsule::schema()->create('steam_apps', function ($table) {
$table->integer('id')->unique(); $table->bigInteger('id')->unique();
$table->string('name'); $table->string('name');
}); });
Capsule::schema()->create('steam_queue', function ($table) { Capsule::schema()->create('steam_queue', function ($table) {
$table->increments('id')->unique(); $table->increments('id')->unique();
$table->integer('app_id'); $table->bigInteger('app_id');
$table->string('status'); $table->string('status');
$table->string('platform'); $table->string('platform');
$table->integer('popularity')->nullable()->default(1); $table->integer('popularity')->nullable()->default(1);