Sha256: 9528642d59255c6ad610b89a9d1dc611a9eb82284b845a61877b0902d87224ab

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

Sequel.migration do
  up do
    run "CREATE TABLE `nodes` (
      `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(128) NOT NULL DEFAULT '',
      `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`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"
  end

  down do
    drop_table :nodes
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-data-1.2.0 lib/legion/data/migrations/002_add_nodes.rb