[Asterisk-code-review] queue_log: Add alembic script for generate db table for queue_log (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Wed Nov 20 11:43:18 CST 2019
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/4012 )
Change subject: queue_log: Add alembic script for generate db table for queue_log
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.asterisk.org/c/asterisk/+/4012/2/contrib/ast-db-manage/queue_log/versions/4105ee839f58_create_queue_log_table.py
File contrib/ast-db-manage/queue_log/versions/4105ee839f58_create_queue_log_table.py:
https://gerrit.asterisk.org/c/asterisk/+/4012/2/contrib/ast-db-manage/queue_log/versions/4105ee839f58_create_queue_log_table.py@21
PS2, Line 21: 'queue_log',
> Why not to use a multi column unique index between time + queuename? […]
As long as the time value is granular enough to ensure two records are not written for the same queuename at the same time then a primary key using those two columns would work.
However, I am not sure that would be the case, and it would certainly depend on the various database backends. So I'm thinking that is not the way to go.
Having a primary key helps in indexing, thus searching. I guess it's not officially required. I was always under the impression though it was something usually good to have.
I don't know. Think it's worth adding one? If so you can add one to the CDR table as well if you feel inclined, but since that one is already established I'd say you don't have to worry about it.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/4012
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I35b928a6251f9da9a1742b2cd14c63a00c3d0f0c
Gerrit-Change-Number: 4012
Gerrit-PatchSet: 2
Gerrit-Owner: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Name of user not set #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
Gerrit-Comment-Date: Wed, 20 Nov 2019 17:43:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Comment-In-Reply-To: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191120/703a7e6c/attachment-0001.html>
More information about the asterisk-code-review
mailing list