we dont do any updates or deletes.
On delete the deletedColumn is set to mark the record as deleted.
On update a new record is created an the old record is marked as deleted.
Create a table like the following:
CREATE TABLE customer (
id INT NOT NULL AUTO_INCREMENT, -- name of this column is optional
itemId INT, -- name of this column is itemId by default but can be set to whatever you like
-- your columns here
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- column is optional
deleted TIMESTAMP NULL DEFAULT NULL, -- name of this column is itemId by default but can be set to whatever you like
PRIMARY KEY (id),
Hope you like it.
Number of downloads: 5