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

Tutorial Improvements: recommend how to get started with existing databases that aren't using sqitch #77

Closed
joevandyk opened this issue Feb 26, 2013 · 8 comments

Comments

@joevandyk
Copy link

I'm guessing this is will be the case for most people coming to sqitch.

The existing schema should be known to sqitch, so that sqitch can bootstrap new development databases with the same structure. But when sqitch deploys to existing production databases, sqitch shouldn't try to deploy the already existing schema.

@joevandyk
Copy link
Author

Possibly this should be done with a 'bootstrap' command, so that sqitch doesn't try to deploy the initial schema to databases that don't already have sqitch installed?

@theory
Copy link
Collaborator

theory commented Feb 26, 2013

That's what the --log-only option to sqitch deploy is for. For bootstrapping existing projects, there's issue #24.

@theory theory closed this as completed Feb 26, 2013
@joevandyk
Copy link
Author

Ah, yes, the --log-only command would be helpful. Maybe add that to a Getting Started doc?

Steps:

  • Install sqitch, setup sqitch directory
  • Dump initial schema, make a new deployment file
  • Check in, tag as v1.
  • Your first deployment needs to be a --log-only deployment to v1 to existing databases. Then you can deploy as normal.

Does that sound right?

@theory
Copy link
Collaborator

theory commented Feb 26, 2013

Yes.

Might want to start an FAQ, I dunno…

@unamachivaym
Copy link

Hi @theory I have been thrilled to know about sqitch and started playing around. I wanted to use it for an existing database but couldn't find much help with respect to docs. One of your wiki page says that dump initial schema. Does that mean creating a new schema for sqitch metadata or creating a new schema for the project.

If its for the project then how about the existing schema being used for the project which contains lots of tables,views etc.

Kindly help.

@theory
Copy link
Collaborator

theory commented May 10, 2018

This is a fairly common question, and has been discussed on the mail list reasonably often. here' one thread on the topic. HTH!

@unamachivaym
Copy link

Yup thank you @theory. got that worked. How sqitch is different than flyway because i could see flyway gives almost the same flexibility even allows to develop advance scripts using java itself. can you give some pointers which explains that. basically flyway vs sqitch.

@theory
Copy link
Collaborator

theory commented May 11, 2018

Sorry, never heard of Flyway. I suggest you post your question to the mail list; someone else may well have some context to share.

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

3 participants