module Prostore::Migration::Bookkeeping

Overview

Bootstrap the four prostore_* bookkeeping tables (ADR-0009, ADR-0010).

All operations run on a caller-supplied executor (DB::Database, DB::Connection, or DB::Transaction) so the migration runner can pin everything to a single checked-out connection (avoiding pool deadlock).

Extended Modules

Defined in:

prostore/migration/bookkeeping.cr

Constant Summary

META_TABLE = "prostore_meta"
MIGRATION_STEP_TABLE = "prostore_migration_step"
MIGRATION_TABLE = "prostore_migration"
SCHEMA_TABLE = "prostore_schema"

Instance Method Summary

Instance Method Detail

def create_meta_sql(adapter : Prostore::Adapter::Base) : String #

Internal-version metadata (prostore_meta) is created by Migration::Internal.run before the runner reaches #ensure_tables, so it isn't part of the standard bookkeeping bootstrap. The DDL lives here for cohesion with the other bookkeeping table definitions.


[View source]
def ensure_tables(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor) : Nil #

[View source]