Sequel.migration do up do run "CREATE TABLE `datacenters` ( `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 '', `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 `name` (`name`), KEY `active` (`active`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" end down do drop_table :datacenters end end