2023_02_11_155505_change_tweet_field_to_library_items_table.php

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 16:57:49 +01:00
parent c965188b00
commit 5ae2f9d498

View File

@@ -12,9 +12,11 @@ return new class extends Migration {
public function up() public function up()
{ {
Schema::table('library_items', function (Blueprint $table) { Schema::table('library_items', function (Blueprint $table) {
$table->boolean('tweet') DB::statement("ALTER TABLE library_items
->default(false) ALTER COLUMN tweet DROP DEFAULT,
->change(); ALTER COLUMN tweet TYPE BOOLEAN USING tweet::BOOLEAN,
ALTER COLUMN tweet SET DEFAULT FALSE;"
);
}); });
} }