Sequel.migration do up do run "CREATE TABLE `task_logs` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `task_id` int(11) unsigned NOT NULL, `node_id` int(11) unsigned NOT NULL, `log` text, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" end down do drop_table :task_logs end end