pixelfed/database/migrations/2019_04_25_200411_add_snowflake_ids_to_collections_table.php

39 lines
896 B
PHP
Raw Normal View History

2019-04-26 01:55:28 +00:00
<?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();
2024-08-08 04:28:21 +00:00
$table->dropPrimary('id');
2019-04-26 01:55:28 +00:00
});
Schema::table('collection_items', function (Blueprint $table) {
$table->bigInteger('id')->unsigned()->primary()->change();
2024-08-08 04:28:21 +00:00
$table->dropPrimary('id');
2019-04-26 01:55:28 +00:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('collections', function (Blueprint $table) {
//
});
}
}