Before we continue, let's make our article table a little more complex, by adding a few columns. We will add three more columns:
is_published field will be a Boolean type (in MySQL, it will have a value of 0 or 1), and the
updated_at fields will have the
datetime type. They will hold information about when our article was created and when it was updated. You can alter the
article table and add these fields using the following code:
ALTER TABLE `article` ADD `is_published` BOOLEAN NOT NULL DEFAULT FALSE , ADD `created_at` DATETIME NOT NULL , ADD `updated_at` DATETIME NULL DEFAULT NULL ;
We also need to make modifications ...