pixelfed/database/migrations/2019_04_25_200411_add_snowflake_ids_to_collections_table.php
Daniel Supernault 3a49876e31
Fix migrations
2024-08-07 22:28:21 -06:00

39 lines
896 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSnowflakeIdsToCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('collections', function (Blueprint $table) {
$table->bigInteger('id')->unsigned()->primary()->change();
$table->dropPrimary('id');
});
Schema::table('collection_items', function (Blueprint $table) {
$table->bigInteger('id')->unsigned()->primary()->change();
$table->dropPrimary('id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('collections', function (Blueprint $table) {
//
});
}
}