Sha256: 86d02595320e2c92011021224fbd5824996e5b3f89da9cc68f57462ec723a2d8
Contents?: true
Size: 543 Bytes
Versions: 2
Compression:
Stored size: 543 Bytes
Contents
Sequel.migration do transaction up do run 'ALTER TABLE `nodes` ADD CONSTRAINT `node_datacenter_id` FOREIGN KEY (`datacenter_id`) REFERENCES `datacenters` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;' run 'ALTER TABLE `nodes` ADD CONSTRAINT `node_environment_id` FOREIGN KEY (`environment_id`) REFERENCES `environments` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;' end down do run 'ALTER TABLE `nodes` DROP FOREIGN KEY `node_environment_id`;' run 'ALTER TABLE `nodes` DROP FOREIGN KEY `node_datacenter_id`;' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
legion-data-0.1.1 | lib/legion/data/migrations/014_nodes_foreign_keys.rb |
legion-data-0.1.0 | lib/legion/data/migrations/014_nodes_foreign_keys.rb |