refactor Migration + add nullables

main
Alex 2 years ago
parent 9c87d24b78
commit 6be503b733

@ -15,60 +15,61 @@ return new class extends Migration
Schema::connection('pgsql_rauru')->create('games', function (Blueprint $table) { Schema::connection('pgsql_rauru')->create('games', function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->json('age_ratings'); $table->json('age_ratings');
$table->string('aggregated_rating'); $table->string('aggregated_rating')->nullable();
$table->integer('aggregated_rating_count'); $table->integer('aggregated_rating_count')->nullable();
$table->json('alternative_names'); $table->json('alternative_names');
$table->json('artworks'); $table->json('artworks')->nullable();
//$table->json('bundles'); $table->json('bundles')->nullable();
$table->integer('category');//enum $table->string('category');//enum
$table->uuid('checksum'); $table->uuid('checksum');
$table->string('collection'); $table->json('collection')->nullable();
$table->string('cover_id'); //$table->string('cover_id');
$table->string('cover_image_path'); //$table->string('cover_image_path');
$table->json('dlcs'); $table->json('cover');
//$table->json('expanded_games'); $table->json('dlcs')->nullable();
$table->json('expansions'); $table->json('expansions')->nullable();
$table->json('expanded_games')->nullable();
$table->json('external_games');//IDs on other Platforms $table->json('external_games');//IDs on other Platforms
$table->date('first_release_date'); $table->integer('first_release_date'); #Timestamp
//$table->integer('follows'); $table->integer('follows')->nullable();
//$table->json('forks'); $table->json('forks')->nullable();
$table->string('franchise'); $table->json('franchise')->nullable();
$table->json('franchises'); $table->json('franchises')->nullable();
$table->json('game_engines'); $table->json('game_engines')->nullable();
$table->json('game_localizations'); $table->json('game_localizations')->nullable();
$table->json('game_modes'); $table->json('game_modes')->nullable();
$table->json('genres'); $table->json('genres');
//$table->integer('hypes'); $table->integer('hypes')->nullable();
$table->json('involved_companies'); $table->json('involved_companies');
$table->json('keywords'); $table->json('keywords');
$table->json('language_supports'); $table->json('language_supports')->nullable();
$table->json('multiplayer_modes'); $table->json('multiplayer_modes')->nullable();
$table->string('name'); $table->string('name');
$table->string('parent_game'); $table->string('parent_game')->nullable();
$table->json('platforms'); $table->json('platforms');
$table->json('player_perspectives'); $table->json('player_perspectives')->nullable();
$table->json('ports'); $table->json('ports')->nullable();
$table->string('rating');//formated double $table->string('rating');//formated double
//$table->integer('rating_count'); $table->integer('rating_count');
$table->json('release_dates'); $table->json('release_dates')->nullable();
$table->json('remakes'); $table->json('remakes')->nullable();
$table->json('remasters'); $table->json('remasters')->nullable();
$table->json('screenshots'); $table->json('screenshots')->nullable();
$table->json('similar_games'); $table->json('similar_games');
$table->string('slug'); $table->string('slug');
$table->json('standalone_expansions'); $table->json('standalone_expansions')->nullable();
$table->integer('status');//enum $table->integer('status')->nullable();//enum
$table->text('storyline'); $table->text('storyline')->nullable();
$table->text('summary'); $table->text('summary');
$table->json('tags'); $table->json('tags');
$table->json('themes'); $table->json('themes');
$table->string('total_rating');//formated double $table->double('total_rating');//formated double
//$table->integer('total_rating_count'); $table->integer('total_rating_count');
//$table->date('updated_at'); #$table->date('updated_at');
$table->string('url');//IGDB Url $table->string('url');//IGDB Url
$table->string('version_parent'); $table->string('version_parent')->nullable();
$table->string('version_title'); $table->string('version_title')->nullable();
$table->json('videos'); $table->json('videos')->nullable();
$table->json('websites'); $table->json('websites');
$table->timestamps(); $table->timestamps();

Loading…
Cancel
Save