35 lines
782 B
TypeScript
35 lines
782 B
TypeScript
import { TableMigration, BaseMigration } from "../auto/migration ";
|
|
|
|
import { nocoApi, toNocoApi } from "./auto-common";
|
|
|
|
const toBaseId = 'pjc9ks10ttrv6vz';
|
|
|
|
const baseId = 'p0np8adsoc79odk';
|
|
|
|
const tableId = 'mgt91mysuwts4e6';
|
|
|
|
async function migrateTable() {
|
|
const tableMigration = new TableMigration({
|
|
fromTableId: tableId,
|
|
fromNoco: nocoApi,
|
|
toNoco: toNocoApi,
|
|
toBaseId,
|
|
});
|
|
await tableMigration.migrate();
|
|
}
|
|
|
|
// await migrateTable();
|
|
|
|
async function mirgtateBase() {
|
|
const baseMigration = new BaseMigration({
|
|
fromBaseId: baseId,
|
|
toBaseId,
|
|
fromNoco: nocoApi,
|
|
toNoco: toNocoApi,
|
|
});
|
|
await baseMigration.migrate({
|
|
excludeTables: ['控制中枢', '人生备忘录'],
|
|
// includeTables: ['人生备忘录']
|
|
});
|
|
}
|
|
mirgtateBase(); |