[asterisk-bugs] [JIRA] (ASTERISK-24311) Populating database via Alembic fails when using same database for multiple schema sets

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu Sep 18 17:44:28 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222708#comment-222708 ] 

Rusty Newton commented on ASTERISK-24311:
-----------------------------------------

[~jrose] looked at this with me. It is pretty clear that what you are doing will fail, however we are not sure on the best solution in the long run. 

It appears that you really need a separate DB for each schema set. I think it would be nice if that wasn't the case. At a minimum, there is a documentation issue here where it isn't clear how a user should proceed in this case. 

[~dafi] can you expand on your work-around? Are you renaming alembic_version and duplicating that table? I'm not sure I understand.

> Populating database via Alembic fails when using same database for multiple schema sets
> ---------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24311
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24311
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Contrib/General
>    Affects Versions: 12.5.0
>         Environment: Ubuntu 14.04 LTS
>            Reporter: Dafi Ni
>            Severity: Minor
>
> When using same database for:
> config.ini cdr.ini voicemail.ini
> populate config is fine
> next running cdr :
> {quote} 
> root at KRA-WS-DAFI:/usr/src/asterisk-svn/contrib/ast-db-manage# alembic -c cdr.ini upgrade head
> INFO  \[alembic.migration] Context impl MySQLImpl.
> INFO  \[alembic.migration] Will assume non-transactional DDL.
> ERROR \[alembic.util] No such revision '5139253c0423'
>   FAILED: No such revision '5139253c0423'
> {quote}
> because in table "alembic_version" alembic store last migration from config.ini
> same is with voicemail:
> {quote}
> root at KRA-WS-DAFI:/usr/src/asterisk-svn/contrib/ast-db-manage# alembic -c voicemail.ini upgrade head
> INFO  \[alembic.migration] Context impl MySQLImpl.
> INFO  \[alembic.migration] Will assume non-transactional DDL.
> ERROR \[alembic.util] No such revision '5139253c0423'
>   FAILED: No such revision '5139253c0423'
> {quote}
> As workaround it is necessary to rename alembic_version when using different configs.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list