소스 검색

Update migration

Daniel Supernault 4 년 전
부모
커밋
9c5e6a7172
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      database/migrations/2021_01_25_011355_add_cdn_url_to_avatars_table.php

+ 5 - 1
database/migrations/2021_01_25_011355_add_cdn_url_to_avatars_table.php

@@ -14,7 +14,9 @@ class AddCdnUrlToAvatarsTable extends Migration
     public function up()
     {
         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');
         });
     }
@@ -28,6 +30,8 @@ class AddCdnUrlToAvatarsTable extends Migration
     {
         Schema::table('avatars', function (Blueprint $table) {
             $table->dropColumn('cdn_url');
+            $table->dropColumn('size');
+            $table->dropColumn('is_remote');
             $table->string('thumb_path')->nullable();
         });
     }