CREATE TABLE logs( log_id SERIAL PRIMARY KEY, date_edit TIMESTAMP NOT NULL, sql_text TEXT NOT NULL, old_value JSONB NOT NULL, user_name TEXT NOT NULL );
The table logs has five columns. log_id is the primary key and it has a serial data type, date_edit is the date and time of when the data was changed, sql_text is a text that contains the sql query that was used to change the data, old_value is a JSONB that contains the old data, user_name is a text that contains the name of the user who changed the data.