Added logging mechanism for user actions.
This commit is contained in:
@@ -1732,4 +1732,51 @@
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="20-11-2024_1" author="Piyush">
|
||||
<createTable tableName="user_action">
|
||||
<column autoIncrement="true" name="id" type="INTEGER">
|
||||
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_user_action"/>
|
||||
</column>
|
||||
<column name="user_id" type="INTEGER"/>
|
||||
<column name="action_type" type="TEXT"/>
|
||||
<column name="request_body" type="TEXT"/>
|
||||
<column name="login_attempt_id" type="INTEGER"/>
|
||||
<column name="ip_address" type="TEXT"/>
|
||||
<column name="action_context" type="TEXT"/>
|
||||
<column name="method_type" type="TEXT"/>
|
||||
<column name="hub_id" type="INTEGER"/>
|
||||
<column name="url" type="TEXT"/>
|
||||
<column name="response" type="TEXT"/>
|
||||
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="20-11-2024_2" author="Piyush">
|
||||
<createTable tableName="version_history">
|
||||
<column autoIncrement="true" name="id" type="INTEGER">
|
||||
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_version_history"/>
|
||||
</column>
|
||||
<column name="old_data" type="LONGTEXT"/>
|
||||
<column name="new_data" type="LONGTEXT"/>
|
||||
<column name="table_name" type="TEXT"/>
|
||||
<column name="action_type" type="TEXT"/>
|
||||
<column name="record_id" type="INTEGER"/>
|
||||
<column name="user_id" type="INTEGER"/>
|
||||
<column name="user_action_id" type="INTEGER">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
</createTable>
|
||||
|
||||
<addForeignKeyConstraint baseTableName="version_history"
|
||||
baseColumnNames="user_action_id"
|
||||
referencedTableName="user_action"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"
|
||||
constraintName="fk_version_history_user_action"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
||||
Reference in New Issue
Block a user