Sequel.migration do up do run "CREATE TABLE `nodes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `active` tinyint(1) unsigned NOT NULL DEFAULT '1', `name` varchar(128) NOT NULL DEFAULT '', `datacenter_id` int(11) unsigned DEFAULT NULL, `environment_id` int(11) unsigned DEFAULT NULL, `status` varchar(255) NOT NULL DEFAULT 'unknown', `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`), KEY `status` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" end down do drop_table :nodes end end