Sha256: e57ee55404b36d0a96c56b588ded5fcc596713a126d792fd9d031ea4b635a760

Contents?: true

Size: 1.03 KB

Versions: 7

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_table :nodes
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
lex-node-0.2.0 lib/legion/extensions/node/data_test/migrations/001_nodes_table.rb
legion-data-1.1.5 lib/legion/data/migrations/007_add_nodes.rb
legion-data-1.1.4 lib/legion/data/migrations/007_add_nodes.rb
legion-data-java-1.1.3 lib/legion/data/migrations/007_add_nodes.rb
legion-data-1.1.3 lib/legion/data/migrations/007_add_nodes.rb
legion-data-java-1.1.2 lib/legion/data/migrations/007_add_nodes.rb
legion-data-1.1.2 lib/legion/data/migrations/007_add_nodes.rb