Sha256: 846092c984d81bd388d12cdfb3daa3ca802883deb5290fcda0c90ae51171b5fd

Contents?: true

Size: 977 Bytes

Versions: 6

Compression:

Stored size: 977 Bytes

Contents

Sequel.migration do
  up do
    run "CREATE TABLE `datacenters` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL DEFAULT '',
  `active` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `user_owner` int(11) unsigned DEFAULT NULL,
  `group_owner` int(11) unsigned DEFAULT NULL,
  `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 `datacenters_user_owner` (`user_owner`),
  KEY `datacenters_group_owner` (`group_owner`),
  CONSTRAINT `datacenters_group_owner` FOREIGN KEY (`group_owner`) REFERENCES `groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `datacenters_user_owner` FOREIGN KEY (`user_owner`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;"
  end

  down do
    drop_table :datacenters
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
legion-data-1.1.5 lib/legion/data/migrations/006_add_dcs.rb
legion-data-1.1.4 lib/legion/data/migrations/006_add_dcs.rb
legion-data-java-1.1.3 lib/legion/data/migrations/006_add_dcs.rb
legion-data-1.1.3 lib/legion/data/migrations/006_add_dcs.rb
legion-data-java-1.1.2 lib/legion/data/migrations/006_add_dcs.rb
legion-data-1.1.2 lib/legion/data/migrations/006_add_dcs.rb