X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=database%2Fmigrations%2F2024_01_19_090216_chat_evaluation.php;fp=database%2Fmigrations%2F2024_01_19_090216_chat_evaluation.php;h=840950c4ccfefc4b8f01f2c6a0339a5051065f1e;hb=e8eb106aa5adab6dd992390cb3836589e4163e72;hp=0000000000000000000000000000000000000000;hpb=de54817c3d50f64e242a28860d9763a8dacfe4c9;p=alttp.git diff --git a/database/migrations/2024_01_19_090216_chat_evaluation.php b/database/migrations/2024_01_19_090216_chat_evaluation.php new file mode 100644 index 0000000..840950c --- /dev/null +++ b/database/migrations/2024_01_19_090216_chat_evaluation.php @@ -0,0 +1,45 @@ +timestamp('evaluated_at')->nullable()->default(null); + $table->foreignId('user_id')->nullable()->default(null)->constrained(); + $table->foreignId('channel_id')->nullable()->default(null)->constrained(); + $table->string('type')->default(''); + $table->text('text_content')->nullable()->default(null); + $table->boolean('banned')->default(false); + $table->index(['type', 'banned']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('chat_logs', function (Blueprint $table) { + $table->dropColumn('evaluated_at'); + $table->dropForeign(['user_id']); + $table->dropColumn('user_id'); + $table->dropForeign(['channel_id']); + $table->dropColumn('channel_id'); + $table->dropColumn('type'); + $table->dropColumn('text_content'); + $table->dropColumn('banned'); + }); + } +};