Comments (3)
@meyvan non-interactive mode for CLI commands is coming in an upcoming feature release.
from vendure.
https://docs.vendure.io/guides/developer-guide/migrations/#3-run-the-migration
Assuming the migration file looks correct, the next time you start the server,
the migration will be run automatically. This is because the runMigrations
function is called in the src/index.ts file:
Migration should run automatically when you start the server, unless I misunderstood your issue ?
from vendure.
Automatically updating the DB schema when server is started is a Anti-DevOps principle. We should be able to control when and how we run the migrations. And for that npx vendure migrate
command is good, but it is interactive, which cannot(or hard to achieve) in a Github Actions CI/CD pipeline.
A better option is to send in arguments like --no-interaction
combined with --runMigration
or other arguments like that
Nevertheless, I found a way to run the migration separately.
And to anyone coming here, at the time of writing, copy the
import { runMigrations } from '@vendure/core';
import { config } from './vendure-config';
runMigrations(config)
.then(() => console.log('Migration Complete'))
.catch(err => {
console.log(err);
});
into a separate file and run it using ts-node migrate.ts
, whenever and wherever you like
from vendure.
Related Issues (20)
- Re-authenticate and re-fetch Customer-data with auth-token. HOT 6
- Mollie doesn't call webhook HOT 3
- (!) Admin UI no longer compiles / starts after updating to version 2.2.7 HOT 5
- "State" is not passed to promotion action `onActivate` function
- List View Filter customization HOT 2
- No longer allowed to migrate due to MissingPrimaryColumnError in JobRecordBuffer HOT 2
- Vendure CLI commands for build/testing + JSON-config (similar to what angular.json is)
- Add maxDiscountAmount to PromotionItemAction
- 404 for docs search results HOT 1
- Implement a means to ignore selected compatibility errors
- AdminUiConfig apiHost and apiPort default values different than what is documented. HOT 3
- Can't start test server due to driverError: Error: no such table: zone_members_region HOT 1
- GetOrderDetails Query take 10 seconds to load HOT 4
- Cannot remove coupon after applying in draft order HOT 1
- LocaleDate displays incorrect time format for certain locales HOT 1
- Mollie Plugin doesn't check for eligibility HOT 3
- csv
- Could not load the "sharp" module using the win32-x64 runtime HOT 2
- Location selector using Google Maps (for use-cases that require pickup instead of shipping)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vendure.