-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/globocom/GloboNetworkAPI
- Loading branch information
Showing
115 changed files
with
5,673 additions
and
1,069 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
dbmigrate/migrations/20191218174411_create_table_environment_cidr.migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#-*- coding:utf-8 -*- | ||
SQL_UP = u""" | ||
|
||
CREATE TABLE `environment_cidr` ( | ||
`id` INT NOT NULL AUTO_INCREMENT, | ||
`id_network_type` INT(10) UNSIGNED NOT NULL, | ||
`id_env` INT(10) UNSIGNED NOT NULL, | ||
`network_first_ip` varchar(40) NOT NULL, | ||
`network_last_ip` varchar(40) NOT NULL, | ||
`network_mask` varchar(3) NOT NULL, | ||
`ip_version` enum('v6','v4') NOT NULL, | ||
`subnet_mask` varchar(3) NOT NULL, | ||
PRIMARY KEY (`id`)); | ||
|
||
ALTER TABLE `environment_cidr` | ||
ADD INDEX `fk_environment_cidr_fk1_idx` (`id_network_type` ASC) COMMENT '', | ||
ADD INDEX `fk_environment_cidr_fk2_idx` (`id_env` ASC) COMMENT ''; | ||
|
||
ALTER TABLE `environment_cidr` | ||
ADD CONSTRAINT `fk_environment_cidr_fk1` | ||
FOREIGN KEY (`id_network_type`) | ||
REFERENCES `tipo_rede` (`id_tipo_rede`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION, | ||
ADD CONSTRAINT `fk_environment_cidr_fk2` | ||
FOREIGN KEY (`id_env`) | ||
REFERENCES `ambiente` (`id_ambiente`) | ||
ON DELETE NO ACTION | ||
ON UPDATE NO ACTION; | ||
|
||
""" | ||
|
||
SQL_DOWN = u""" | ||
|
||
ALTER TABLE `environment_cidr` | ||
DROP FOREIGN KEY `fk_environment_cidr_fk1`, | ||
DROP FOREIGN KEY `fk_environment_cidr_fk2`; | ||
|
||
ALTER TABLE `environment_cidr` | ||
DROP INDEX `fk_environment_cidr_fk1_idx` , | ||
DROP INDEX `fk_environment_cidr_fk2_idx` ; | ||
|
||
DROP TABLE `environment_cidr`; | ||
|
||
""" |
12 changes: 12 additions & 0 deletions
12
dbmigrate/migrations/20200130173043_alter_table_environment_cidr.migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#-*- coding:utf-8 -*- | ||
SQL_UP = u""" | ||
ALTER TABLE `environment_cidr` | ||
ADD COLUMN `network` varchar(44) NOT NULL; | ||
|
||
""" | ||
|
||
SQL_DOWN = u""" | ||
ALTER TABLE `environment_cidr` | ||
DROP COLUMN `network`; | ||
|
||
""" |
13 changes: 13 additions & 0 deletions
13
dbmigrate/migrations/20200204182946_alter_table_environment_cidr_use_unique_key.migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#-*- coding:utf-8 -*- | ||
SQL_UP = u""" | ||
ALTER TABLE `environment_cidr` | ||
ADD UNIQUE KEY `cidr_uni` (`id_env`,`network`); | ||
|
||
""" | ||
|
||
SQL_DOWN = u""" | ||
ALTER TABLE `environment_cidr` | ||
DROP UNIQUE KEY `cidr_uni`; | ||
|
||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/sh | ||
|
||
pip install -r requirements_test.txt | ||
|
||
echo "exporting NETWORKAPI_DEBUG" | ||
export NETWORKAPI_LOG_QUEUE=0 | ||
|
||
|
Oops, something went wrong.