Sha256: 4de9fd4266fc02c3f298c92471f7458f90399849de546d121960240808f0e0ad
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
Sequel.migration do up do run "CREATE TABLE `nodes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `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', `active` tinyint(1) unsigned NOT NULL DEFAULT '1', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `active` (`active`), KEY `status` (`status`), KEY `node_datacenter_id` (`datacenter_id`), KEY `node_environment_id` (`environment_id`), CONSTRAINT `node_datacenter_id` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `node_environment_id` FOREIGN KEY (`environment_id`) REFERENCES `environments` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;" end down do drop :nodes end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
legion-data-0.2.0 | lib/legion/data/migrations/007_add_nodes.rb |