add unique constraints to topology table
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
* Rename plugins developer doc to .pod
|
* Rename plugins developer doc to .pod
|
||||||
* Update to latest Bootstrap and JQuery, and temp. fix #7326 in Bootstrap
|
* Update to latest Bootstrap and JQuery, and temp. fix #7326 in Bootstrap
|
||||||
* Partial Name in Port search now working
|
* Partial Name in Port search now working
|
||||||
|
* Add unique constraints to topology table
|
||||||
|
|
||||||
2.007000_001 - 2013-03-17
|
2.007000_001 - 2013-03-17
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use base 'DBIx::Class::Schema';
|
|||||||
|
|
||||||
__PACKAGE__->load_namespaces;
|
__PACKAGE__->load_namespaces;
|
||||||
|
|
||||||
our $VERSION = 17; # schema version used for upgrades, keep as integer
|
our $VERSION = 18; # schema version used for upgrades, keep as integer
|
||||||
|
|
||||||
use Path::Class;
|
use Path::Class;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
|||||||
@@ -19,4 +19,7 @@ __PACKAGE__->add_columns(
|
|||||||
{ data_type => "text", is_nullable => 0 },
|
{ data_type => "text", is_nullable => 0 },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
__PACKAGE__->add_unique_constraint(['dev1','port1']);
|
||||||
|
__PACKAGE__->add_unique_constraint(['dev2','port2']);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- Convert schema '/home/devver/netdisco-ng/Netdisco/bin/../lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-17-PostgreSQL.sql' to '/home/devver/netdisco-ng/Netdisco/bin/../lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-18-PostgreSQL.sql':;
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE topology ADD CONSTRAINT topology_dev1_port1 UNIQUE (dev1, port1);
|
||||||
|
|
||||||
|
ALTER TABLE topology ADD CONSTRAINT topology_dev2_port2 UNIQUE (dev2, port2);
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
Reference in New Issue
Block a user