mirror of
https://github.com/strapi/strapi.git
synced 2026-06-02 16:27:47 +00:00
Run migration_v5 on sqlite, postgres, mysql, and mariadb; add Compose mariadb service, db-mariadb tooling, and Strapi mysql2 wiring for --database mariadb. Extend filters `migrations` to tests/migration and examples/complex (compose, scripts, config, src, package.json) so harness changes trigger the job. Document CI vs CLI in tests/migration README; trim complex README; update v5 .env.example and add db/develop scripts.
23 lines
684 B
JavaScript
23 lines
684 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
|
|
/**
|
|
* @param {string} repoRoot Absolute path to monorepo root
|
|
*/
|
|
function createContext(repoRoot) {
|
|
const complexDir = path.join(repoRoot, 'examples', 'complex');
|
|
const migrationRoot = path.join(complexDir, '.migration-v5');
|
|
return {
|
|
REPO_ROOT: repoRoot,
|
|
COMPLEX_DIR: complexDir,
|
|
MIGRATION_ROOT: migrationRoot,
|
|
V4_APP_DIR: path.join(migrationRoot, 'v4-app'),
|
|
SQLITE_PATH: path.join(migrationRoot, 'migration.sqlite'),
|
|
DOCKER_COMPOSE_FILE: path.join(complexDir, 'docker-compose.dev.yml'),
|
|
DOTENV_PATH: path.join(repoRoot, 'tests', 'migration', 'v5', '.env'),
|
|
};
|
|
}
|
|
|
|
module.exports = { createContext };
|