mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Add database schema management using Alembic
This patch replaces contrib/realtime/ with a new setup for managing the database schema required for database integration with Asterisk. In addition to initializing a database with the proper schema, alembic can do a database migration to assist with upgrading Asterisk in the future. Hopefully this helps make setting up and operating Asterisk with a database easier. With this the schema only needs to be maintained in one place instead of once per database. The schemas I have added here have a bit of improvement over the examples that were there before (some added consistency and added some missing indexes). Managing the schema in one place here also applies to all databases supported by SQLAlchemy. See contrib/ast-db-manage/README.md for more details. Review: https://reviewboard.asterisk.org/r/2731 patch by Russell Bryant (license 6300) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
#
|
||||
# Table structure for table `iaxfriends`
|
||||
#
|
||||
|
||||
CREATE TABLE `iaxfriends` (
|
||||
`name` varchar(40) NOT NULL default '',
|
||||
`type` varchar(10) NOT NULL default 'friend', -- friend/user/peer
|
||||
`username` varchar(40) NULL, -- username to send as peer
|
||||
`mailbox` varchar(40) NULL, -- mailbox@context
|
||||
`secret` varchar(40) NULL,
|
||||
`dbsecret` varchar(40) NULL, -- In AstDB, location to store/retrieve secret
|
||||
`context` varchar(40) NULL,
|
||||
`regcontext` varchar(40) NULL,
|
||||
`host` varchar(40) NULL default 'dynamic',
|
||||
`ipaddr` varchar(40) NULL, -- Must be updateable by Asterisk user
|
||||
`port` int(5) NULL, -- Must be updateable by Asterisk user
|
||||
`defaultip` varchar(20) NULL,
|
||||
`sourceaddress` varchar(20) NULL,
|
||||
`mask` varchar(20) NULL,
|
||||
`regexten` varchar(40) NULL,
|
||||
`regseconds` int(11) NULL, -- Must be updateable by Asterisk user
|
||||
`accountcode` varchar(20) NULL,
|
||||
`mohinterpret` varchar(20) NULL,
|
||||
`mohsuggest` varchar(20) NULL,
|
||||
`inkeys` varchar(40) NULL,
|
||||
`outkey` varchar(40) NULL,
|
||||
`language` varchar(10) NULL,
|
||||
`callerid` varchar(100) NULL, -- The whole callerid string, or broken down in the next 3 fields
|
||||
`cid_number` varchar(40) NULL, -- The number portion of the callerid
|
||||
`sendani` varchar(10) NULL, -- yes/no
|
||||
`fullname` varchar(40) NULL, -- The name portion of the callerid
|
||||
`trunk` varchar(3) NULL, -- Yes/no
|
||||
`auth` varchar(20) NULL, -- RSA/md5/plaintext
|
||||
`maxauthreq` varchar(5) NULL, -- Maximum outstanding AUTHREQ calls {1-32767}
|
||||
`requirecalltoken` varchar(4) NULL, -- yes/no/auto
|
||||
`encryption` varchar(20) NULL, -- aes128/yes/no
|
||||
`transfer` varchar(10) NULL, -- mediaonly/yes/no
|
||||
`jitterbuffer` varchar(3) NULL, -- yes/no
|
||||
`forcejitterbuffer` varchar(3) NULL, -- yes/no
|
||||
`allow` varchar(200) NULL, -- all/{list-of-codecs}
|
||||
`codecpriority` varchar(40) NULL,
|
||||
`qualify` varchar(10) NULL, -- yes/no/{number of milliseconds}
|
||||
`qualifysmoothing` varchar(10) NULL, -- yes/no
|
||||
`qualifyfreqok` varchar(10) NULL, -- {number of milliseconds}|60000
|
||||
`qualifyfreqnotok` varchar(10) NULL, -- {number of milliseconds}|10000
|
||||
`timezone` varchar(20) NULL,
|
||||
`adsi` varchar(10) NULL, -- yes/no
|
||||
`amaflags` varchar(20) NULL,
|
||||
`setvar` varchar(200) NULL,
|
||||
PRIMARY KEY (`name`),
|
||||
INDEX name (name, host),
|
||||
INDEX name2 (name, ipaddr, port),
|
||||
INDEX ipaddr (ipaddr, port),
|
||||
INDEX host (host, port)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user