0045. Squashed Initial Schema And Namespaced Packages
Status
Accepted and implemented in 2.1.0. Supersedes the 0001–0017 revision history
and the cli/command_center exclusion in
ADR 0044. Resolves
MainSequenceMarkets#12,
#14 and
#15.
Amends ADRs 0034,
0037,
0042 and
0043, and withdraws the 2.0.2
CHANGELOG promise that revisions 0001–0017 stay unchanged.
The legacy upgrade policy below is superseded by
ADR 0046 in 2.2.7: Production was found
with a populated 0017 schema, which must be preserved.
Context
No MetaTables runtime holds an applied ms-markets history; 0001–0017 only
ran on the retired shared backend (#12). That history altered tables repeatedly,
and 0010 ran PostgreSQL-only SQL, so it could not build the schema on the
MetaTables local SQLite runtime (#15). The wheel also still installed top-level
cli, command_center and .agents entries (#14).
Decision
- One revision,
0018_initial_schema, generated from the models, creates the whole schema on PostgreSQL and on the local SQLite runtime. It never reuses an earlier revision ID: under a reused0001, a database at the old0001would pass as already at head and skip every table. MetaTables 0.1.12 runsJSONBas JSON,Numericas SQLite numbers andpostgresql_wherepredicates there. The provider keymsm:<namespace>,MarketsAlembicVersionand its table are unchanged. cliis renamedmsm_cliandcommand_centeris renamedmsm_command_center, siblings ofmsm_migrations. Themsmconsole script is unchanged. Bundled skills ship insidemsm_cli/_skills/ms_markets. The wheel installs onlymsm,msm_cli,msm_command_center,msm_migrations,msm_portfoliosandmsm_pricing.
Consequences
- The original release rejected
0001–0017. Production later proved the assumption above false: its populated database remained at0017. Release 2.2.7 provides the forward bridge in ADR 0046. Do not reset that database or stamp its version. Earlier legacy heads require separate analysis. - Imports of
cliandcommand_centerchange tomsm_cliandmsm_command_center. - Later schema changes are new revisions after
0018. MetaTables generates them as batch blocks, which run on both engines.