2 years ago

ideas to store record activity logs?

Posted 2 years ago by w1n78

i need to store data whenever a record is created, updated, deleted. my migration file is as follows

Schema::create('record_logs', function (Blueprint $table) {
            $table->string('record_action', 50)
                ->comment('created, updated, deleted')
            $table->string('environment', 50)

no constraints or cascade actions needed. it just creates records in this table. i may need to query the table and display records that belong to the data being tracked. i'm using mysql database for the project and currently using the same db to store this log table.

should i store it in the same database? keep it in mysql but different database? use sqlite? use redis? i'd love to hear how some of you have this implemented. thanks.

Please sign in or create an account to participate in this conversation.