1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update migration

This commit is contained in:
Daniel Supernault 2021-01-25 21:06:25 -07:00
parent 1031311f06
commit 9c5e6a7172
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -14,7 +14,9 @@ class AddCdnUrlToAvatarsTable extends Migration
public function up() public function up()
{ {
Schema::table('avatars', function (Blueprint $table) { Schema::table('avatars', function (Blueprint $table) {
$table->string('cdn_url')->unique()->index()->nullable(); $table->string('cdn_url')->unique()->index()->nullable()->after('remote_url');
$table->unsignedInteger('size')->nullable()->after('cdn_url');
$table->boolean('is_remote')->nullable()->index()->after('cdn_url');
$table->dropColumn('thumb_path'); $table->dropColumn('thumb_path');
}); });
} }
@ -28,6 +30,8 @@ class AddCdnUrlToAvatarsTable extends Migration
{ {
Schema::table('avatars', function (Blueprint $table) { Schema::table('avatars', function (Blueprint $table) {
$table->dropColumn('cdn_url'); $table->dropColumn('cdn_url');
$table->dropColumn('size');
$table->dropColumn('is_remote');
$table->string('thumb_path')->nullable(); $table->string('thumb_path')->nullable();
}); });
} }