Skip to content

Utility function for disabling chronicle #6

@simonw

Description

@simonw

I built this like so for:

    def disable(conn):
        conn.execute('DROP TABLE "{}"'.format(chronicle_table))
        # And remove the triggers
        for trigger in (
            "_chronicle_{}_ai".format(table),
            "_chronicle_{}_ad".format(table),
            "_chronicle_{}_au".format(table),
        ):
            conn.execute('DROP TRIGGER "{}"'.format(trigger))

    await db.execute_write_fn(disable)

A sqlite_chronicle.disable_chronicle(conn, table) utility function would be neater.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions