mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
52d1940460
no-issue We were originally checking the state of the database, e.g. if a foreign key constraint existed, so that we could conditionally act upon it. This was to ensure that our migrations are idempotent. Some database configurations, for example if you have many databases on a single MySQL instance, would cause these information_schema queries to take an exceptionally long time. In order to speed up migrations, we instead attempt the action we want to apply to the database, and then catch relevant errors to ensure the migration is idempotent. SQLite does not error when adding duplicate foreign or primary key constraints, meaning that we must keep in pre-checks for these operations, when running on SQLite Co-authored-by: Daniel Lockyer <hi@daniellockyer.com> |
||
---|---|---|
.. | ||
adapters | ||
api | ||
data | ||
lib | ||
models | ||
public | ||
services | ||
translations | ||
views | ||
web | ||
analytics-events.js | ||
ghost-server.js | ||
notify.js | ||
overrides.js | ||
update-check.js |