Sequel.migration do up do run "CREATE TABLE `functions` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `active` tinyint(1) unsigned NOT NULL DEFAULT '1', `version` int(11) unsigned NOT NULL DEFAULT '1', `name` varchar(128) NOT NULL DEFAULT '', `namespace_id` int(11) unsigned NOT NULL, `args` text, `user_owner` int(11) unsigned DEFAULT NULL, `group_owner` int(11) unsigned DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `namespace_id` (`namespace_id`,`name`), KEY `active` (`active`), KEY `namespace` (`namespace_id`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" end down do drop_table :functionss end end