diff --git a/app/Models/ColumnComment.php b/app/Models/ColumnComment.php new file mode 100644 index 0000000..cf466f4 --- /dev/null +++ b/app/Models/ColumnComment.php @@ -0,0 +1,30 @@ +id(); + $table->string('table_name'); + $table->unsignedBigInteger('record_id'); + $table->string('column_name'); + $table->text('comment'); + $table->text('column_value')->nullable(); + $table->unsignedBigInteger('user_id')->nullable(); + $table->string('ip_address', 45)->nullable(); + $table->timestamps(); + + $table->index(['table_name', 'record_id']); + $table->index(['table_name', 'column_name']); + }); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('column_comments'); + } +};