Skip to content

sync is missing from the docs, and Unknown database problem #437

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

Closed
subatomicglue opened this issue Oct 24, 2016 · 5 comments
Closed

sync is missing from the docs, and Unknown database problem #437

subatomicglue opened this issue Oct 24, 2016 · 5 comments
Labels

Comments

@subatomicglue
Copy link

subatomicglue commented Oct 24, 2016

Going here:
https://db-migrate.readthedocs.io/en/latest/
https://db-migrate.readthedocs.io/en/latest/Getting%20Started/the%20commands/

I do not see sync, which is in my --help

`db-migrate --help
Usage: db-migrate [up|down|reset|sync|create|db|seed|transition] [[dbname/]migrationName|all] [options]

db-migrate --version
0.10.0-beta.20
`

Also, if I drop my database, then I can't figure out how to get it back, using db-migrate:
`> db-migrate db:drop app_test_database

db-migrate db:create app_test_database
[ERROR] Error: ER_BAD_DB_ERROR: Unknown database 'app_test_database'

db-migrate up
[ERROR] Error: ER_BAD_DB_ERROR: Unknown database 'app_test_database'`

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38632664-sync-is-missing-from-the-docs-and-unknown-database-problem?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F73887&utm_medium=issues&utm_source=github).
@wzrdtales
Copy link
Member

@subatomicglue Sync was just introduced shortly, docs are about to being updated thanks for pointing this out though :)

With your second problem, this is a known problem. You have configured a database in your database.json which does not exist anymore. db-migrate currently always connects also for commands like db:create to this db in your config. Therefore you get the error thrown instead of the db created. This will need a few changes to all drivers and is already a working item.

So either you change your config, or you create the db by hand.

See #338

@wzrdtales
Copy link
Member

About sync: it is just the same as up and down, but it figures out by itself if the migration you define is on its way up or down.

@subatomicglue
Copy link
Author

subatomicglue commented Oct 24, 2016

Makes sense. Nice work on db-migrate, really loving it (coming from Flask SQL Alchemy previously). Looking forward to the changes

I'm sure you're aware, I also noticed "seed" was missing from the docs as well:
Usage: db-migrate [up|down|reset|sync|create|db|seed|transition] [[dbname/]migrationName|all] [options]
https://db-migrate.readthedocs.io/en/latest/Getting%20Started/the%20commands/

Enjoying your discussion of the pre-release seed feature here: #292 :-)

@wzrdtales
Copy link
Member

@subatomicglue Yeah, this needs to be cleaned up.

Seeds are postponed to a later point in time. They were originally part of the 0.10.x release, but as I want the current 0.10.x to get stable and switch afterwards to a release cycle with monthly releases I decided to postpone this instead and don't make the release dependent on that. Basically they are just what they sound like. A Data manipulation toolset, as migrations are really to moving a database from one state to another, but this can always include manipulating the data, which is not necessarily part of a migration.

I invested much time the last week into documentation and now take my time to finish those and back the new programable API with tests.

@stale
Copy link

stale bot commented Nov 23, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2017
@stale stale bot closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants