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
✨ use knex-migrator #57
Conversation
@@ -45,6 +46,13 @@ module.exports = BaseCommand.extend({ | |||
// TODO: rethink this | |||
return this.runCommand('config', 'paths.contentPath', path.join(process.cwd(), 'content'), {environment: environment}) | |||
.then(function () { | |||
knexMigrator = new KnexMigrator(); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@acburdine the new Ghost-CLI version won't run with an older Ghost alpha version when merging this PR |
d1ddb33
to
17b259b
Compare
17b259b
to
c17dcb6
Compare
70195fa
to
89229ba
Compare
@kirrg001 I went ahead and changed the code to what I was asking (because needing to get this merged) - but here's why: The cli has to require each command file (so it can get all of the necessary variables like command name, arguments, options, etc). Because of this, adding a bunch of require statements to the top of the file increases load times, especially when the command is not even being run (for example, if you run Basically, this is probably over-ambitious optimization, but as it was a quick change and the same practice is followed everywhere else in the code, I think it's necessary. I'm willing to revert this change in the future if there's good reason to, though 😄 |
So I pulled this locally to test - and it's not working - neither sqlite nor mysql dependencies are installed, so ghost start doesn't work. And I'm not sure that having ghost-cli depend on both sqlite and mysql is a good idea... 😕 |
|
- check database health before starting Ghost - run knex-migrator init if database was never initialised
79fb9b5
to
7feba78
Compare
TODO
Check database health before starting Ghost and run
knex-migrator
init if database was never initialised.