How to use webiny-sql-table-sync - 6 common examples

To help you get started, we’ve selected a few webiny-sql-table-sync examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / webiny-api / src / install / createMySQLTables.js View on Github external
export default async () => {
    const tables = [
        ApiTokenTable,
        Groups2Entities,
        Policies2Entities,
        FileTable,
        GroupTable,
        ImageTable,
        PolicyTable,
        SettingsTable,
        UserTable
    ];

    const sync = new Sync({
        tables,
        drop: true
    });
    await sync.execute();
};
github webiny / webiny-js / packages / webiny-api / src / install / plugins / createMySQLTables.js View on Github external
export default async (config: Object) => {
    const driver: MySQLDriver = (MySQLTable.getDriver(): any);
    driver.setConnection(config.entity.driver.getConnection());

    const tables = [
        SettingsTable,
    ];

    const sync = new Sync({
        tables,
        drop: true
    });
    await sync.execute();
};
github webiny / webiny-js / packages / webiny-api-cms / src / install / plugins / createMySQLTables.js View on Github external
export default async () => {
    const tables = [CategoryTable, PageTable, MenuTable, ElementTable, TagTable, Tags2Pages];

    const sync = new Sync({
        tables,
        drop: true
    });
    await sync.execute();
};
github webiny / webiny-js / examples / api / src / import / users / create.js View on Github external
(async () => {
    const tables = [
        UserTable,
        Identity2RoleTable,
        RoleTable,
        PermissionTable,
        Role2PermissionTable,
        RoleGroupTable,
        Identity2RoleGroupTable,
        Role2RoleGroupTable
    ];

    const sync = new Sync({
        tables,
        drop: true,
        logClass: ConsoleLog
    });
    await sync.execute();

    const { default: importer } = await import("./import");
    return importer();
})();
github webiny / webiny-js / examples / api / src / import / users / create.js View on Github external
(async () => {
    const tables = [
        UserTable,
        Identity2RoleTable,
        RoleTable,
        PermissionTable,
        Role2PermissionTable,
        RoleGroupTable,
        Identity2RoleGroupTable,
        Role2RoleGroupTable
    ];

    const sync = new Sync({
        tables,
        drop: true,
        logClass: ConsoleLog
    });
    await sync.execute();

    const { default: importer } = await import("./import");
    return importer();
})();
github webiny / webiny-js / examples / api / src / import / cms / create.js View on Github external
(async () => {
    const tables = [PageTable, CategoryTable, RevisionTable, FileTable, ImageTable];

    const sync = new Sync({
        tables,
        drop: true,
        logClass: ConsoleLog
    });
    await sync.execute();

    const { default: importer } = await import("./import");
    return importer();
})();

webiny-sql-table-sync

An SQL query builder.

MIT
Latest version published 6 years ago

Package Health Score

66 / 100
Full package analysis

Popular webiny-sql-table-sync functions

Similar packages