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

feat(db): remove knex-migrator dep, use one installed with Ghost #505

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

acburdine
Copy link
Member

refs #503

  • use knex-migrator version installed with Ghost itself
  • remove global knex-migrator dependency
  • remove "same node version" check

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 82.055% when pulling 7bd195f on acburdine:remove-knex-migrator into 430ed8a on TryGhost:master.

@kirrg001
Copy link
Contributor

kirrg001 commented Nov 10, 2017

That would be a great improvement 👍

As soon as we merge the v3 of knex-migrator into Ghost (see TryGhost/Ghost#9199), i am concerned that people will run into problems because of different versions in the CLI and in Ghost.

Is this update something we could release asap? Do you need any help?

@kirrg001
Copy link
Contributor

kirrg001 commented Nov 10, 2017

Is there a concept of forcing people to update to the latest CLI version? I doubt.

refs TryGhost#503
- use knex-migrator version installed with Ghost itself
- remove global knex-migrator dependency
- remove "same node version" check
@acburdine
Copy link
Member Author

@kirrg001 To the first question: yes - I can get this released today or tomorrow. The second question: no, there isn't a way currently to force people to upgrade to the latest Ghost-CLI version. However, I have an idea as to how to make that work, will create a PR for it asap.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 81.529% when pulling c0b1dd7 on acburdine:remove-knex-migrator into 53a3425 on TryGhost:master.

@kirrg001 kirrg001 self-assigned this Nov 10, 2017
@@ -37,16 +37,6 @@ const tasks = {
});
},
nodeVersion: function nodeVersion(ctx) {
const globalBin = execa.shellSync('npm bin -g', {preferLocal: false}).stdout;

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

knexMigratorPromise = context.ui.sudo(`${knexMigratorPath} ${args.join(' ')}`, {sudoArgs: '-E -u ghost'});
} else {
knexMigratorPromise = execa('knex-migrator-migrate', args, {
preferLocal: true,
localDir: __dirname
localDir: path.join(context.instance.dir, 'current')

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still works 😀

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

Successfully merging this pull request may close these issues.

3 participants