Sha256: feac3c2a3ecf838ccfbac43b32ccce0687400418d9221d81e45e7c3271f930cb

Contents?: true

Size: 970 Bytes

Versions: 1

Compression:

Stored size: 970 Bytes

Contents

Sequel.migration do
  up do
    run "CREATE TABLE `chains` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL DEFAULT '',
  `active` tinyint(1) unsigned DEFAULT '1',
  `version` int(11) unsigned NOT NULL DEFAULT '1',
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `user_owner` int(11) unsigned DEFAULT NULL,
  `group_owner` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `active` (`active`),
  KEY `chains_user_owner` (`user_owner`),
  KEY `chains_group_owner` (`group_owner`),
  CONSTRAINT `chains_group_owner` FOREIGN KEY (`group_owner`) REFERENCES `groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `chains_user_owner` FOREIGN KEY (`user_owner`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;"
  end

  down do
    drop :chains
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-data-0.2.0 lib/legion/data/migrations/004_add_chains.rb