diff --git a/database/migrations/2019_04_25_200411_add_snowflake_ids_to_collections_table.php b/database/migrations/2019_04_25_200411_add_snowflake_ids_to_collections_table.php new file mode 100644 index 000000000..10392de1f --- /dev/null +++ b/database/migrations/2019_04_25_200411_add_snowflake_ids_to_collections_table.php @@ -0,0 +1,43 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + } + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('collections', function (Blueprint $table) { + $table->dropPrimary('id'); + $table->bigInteger('id')->unsigned()->primary()->change(); + }); + + Schema::table('collection_items', function (Blueprint $table) { + $table->dropPrimary('id'); + $table->bigInteger('id')->unsigned()->primary()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('collections', function (Blueprint $table) { + // + }); + } +}