Line data Source code
1 : import { renameFileIfPresent } from '../migration_folder.js';
2 : import type { SessionMigrationStep } from '../session_migration.js';
3 :
4 : /// The catalog files share the dashql-catalog prefix.
5 : /// The prefix shipped without a version of its own, folders of version 2 may have it already.
6 1 : export const catalogFilePrefix: SessionMigrationStep = {
7 1 : version: 3,
8 1 : description: 'Prefix the catalog files with dashql-catalog',
9 1 : async migrate(folder) {
10 1 : await renameFileIfPresent(folder, 'dashql-relations.sql', 'dashql-catalog-relations.sql');
11 1 : await renameFileIfPresent(folder, 'dashql-functions.sql', 'dashql-catalog-functions.sql');
12 1 : },
13 1 : };
|