[Asterisk-code-review] res pjsip: Endpoint IP Access Controls (asterisk[13])

George Joseph asteriskteam at digium.com
Fri Apr 8 15:53:27 CDT 2016


George Joseph has posted comments on this change.

Change subject: res_pjsip: Endpoint IP Access Controls
......................................................................


Patch Set 2:

> I think also need to alter realtime DB table ps_endpoints
 > ALTER TABLE `ps_endpoints` ADD (
 > `deny` VARCHAR(95) DEFAULT NULL,
 > `permit` VARCHAR(95) DEFAULT NULL,
 > `acl` VARCHAR(40) DEFAULT NULL,
 > `contact_deny` VARCHAR(95) DEFAULT NULL,
 > `contact_permit` VARCHAR(95) DEFAULT NULL,
 > `contact_acl` VARCHAR(40) DEFAULT NULL
 > );
 > 
 > I don't know how do it using alembic

Actually, it's pretty easy. 


 > I think also need to alter realtime DB table ps_endpoints
 > ALTER TABLE `ps_endpoints` ADD (
 > `deny` VARCHAR(95) DEFAULT NULL,
 > `permit` VARCHAR(95) DEFAULT NULL,
 > `acl` VARCHAR(40) DEFAULT NULL,
 > `contact_deny` VARCHAR(95) DEFAULT NULL,
 > `contact_permit` VARCHAR(95) DEFAULT NULL,
 > `contact_acl` VARCHAR(40) DEFAULT NULL
 > );
 > 
 > I don't know how do it using alembic

Actually, it's pretty easy...
$ cd contrib/ast-db-manage
$ alembic -c config.ini.sample revision -m "<a good description>"

This will add a new file in config/versions that has a template in it.  Then look at some of the others to see how to add/drop columns.

These links can help:
https://wiki.asterisk.org/wiki/display/AST/Merging+alembic+scripts
https://wiki.asterisk.org/wiki/display/AST/Managing+Realtime+Databases+with+Alembic

-- 
To view, visit https://gerrit.asterisk.org/2551
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I456dea3909d929d413864fb347d28578415ebf02
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list