Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database prefix is incompatible with migrations #105

Closed
webdevian opened this issue Feb 24, 2017 · 1 comment
Closed

Database prefix is incompatible with migrations #105

webdevian opened this issue Feb 24, 2017 · 1 comment

Comments

@webdevian
Copy link
Contributor

RE: The new prefix feature - #58

There's an issue with this feature when running migrations. It creates the adonis schema table without the prefix, then tries to select from it with the prefix.

With prefix set as '_test'
./ace migration:run

create table if not exists `adonis_schema` (`id` int unsigned not null auto_increment primary key, `name` varchar(255), `batch` int, `migration_time` timestamp)'

select `name` as `name`, `name` from `live_adonis_schema` order by `name` asc'
Error: select `name` as `name`, `name` from `test_adonis_schema` order by `name` asc - ER_NO_SUCH_TABLE: Table 'test_adonis_schema' doesn't exist

Sadly setting a custom migrationsTable config value doesn't get around this, as it also inconsistently prefixes the custom value

thetutlage added a commit that referenced this issue Jul 16, 2017
Schema commands should never prefix the table name and instead the end-users should provide the

actual tablename, also fixed where lucid itself was selecting migrations table with prefix

Closes #105
@nicopenaredondo
Copy link

Any updates on this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants