[SR-Users] How to Add Customer Table During Installation

me.projects at yahoo.com me.projects at yahoo.com
Thu Nov 5 15:03:04 CET 2020


 Hi,
Thanks for your reply. Some times we need to provide Initial Data in some tables so I think we can use something you suggested. 
    On Thursday, November 5, 2020, 06:00:23 PM GMT+5, Daniel-Constantin Mierla <miconda at gmail.com> wrote:  
 
  Hello, 
  if you put the sql to create the table in share/kamailio/mysql/customtable-create.sql 
  then you can run: 
  kamdbctl add-tables customtable 
  This has to be done after the kamdbctl create command. 
  If you plan for long term, also taking in consideration the option to add management of customtable records in the cli, I can recommend to look at kamcli: 
    * https://github.com/kamailio/kamcli 
  It can also create the customtable using: 
  kamcli db create-tables-group customtable 
  The 'kamcli db' offers what old 'kamdbctl' and 'kamctl db ...' do. 
  But then you can just add your own python file in 'kamcli/commands/cmd_customtable.py' to manage records in that table (for example, you can use cmd_aliasdb.py as a starting point). 
  Cheers,
 Daniel
  
  On 05.11.20 13:40, me.projects at yahoo.com wrote:
  
 
 Hi, 
  I want add some custom Table Creation during installation of Kamailio.  
  I want to add my Custom Table during the execution of  
  kamdbctl create
  
  command. Currently I am adding my script in  
  share/kamailio/mysql/auth_db-create.sql 
  Thanks,  
  _______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
 

 
 -- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201105/4d570a8c/attachment.htm>


More information about the sr-users mailing list