Sequel.migration do up do run "CREATE TABLE `relationships` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `active` tinyint(1) unsigned NOT NULL DEFAULT '1', `name` varchar(128) DEFAULT NULL, `chain_id` int(11) unsigned DEFAULT NULL, `trigger_id` int(11) unsigned NOT NULL, `action_id` int(11) unsigned NOT NULL, `delay` int(11) unsigned NOT NULL DEFAULT '0', `conditions` text, `transformation` text, `version` tinyint(5) unsigned NOT NULL DEFAULT '1', `created_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `group_owner` int(11) unsigned DEFAULT NULL, `user_owner` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `active` (`active`), KEY `name` (`name`), KEY `deplay` (`delay`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" end down do drop_table :relationships end end