mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-25 20:15:37 +02:00
fix(channel): renumber generalization migration 123 -> 124
main merged 123_issue_stage after this branch forked, so the branch's 123_channel_generalization now collides on the migration number. The runner keys schema_migrations by full version string and would still apply both, but a duplicate number is a merge hazard and convention violation, so move the channel migration to the next free slot (124). issue_stage (ALTER issue ADD COLUMN stage) and the channel generalization touch disjoint tables; verified on PG17 that 123_issue_stage applies cleanly on a DB already carrying 124_channel_generalization, so the two are order-independent. sqlc regenerated (v1.31.1): only the migration-number comment changed. MUL-3515 Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- Reverse 123_channel_generalization.up.sql. The lark_* tables were left
|
||||
-- Reverse 124_channel_generalization.up.sql. The lark_* tables were left
|
||||
-- in place by the up migration, so rolling back only needs to drop the
|
||||
-- channel_* tables that were added.
|
||||
DROP TABLE IF EXISTS channel_binding_token;
|
||||
@@ -97,7 +97,7 @@ type ClaimChannelInboundDedupParams struct {
|
||||
// claim is acquired (fresh insert, or stale-reclaim of an in-flight claim
|
||||
// older than 60s); returns no rows when terminal (processed) or actively
|
||||
// in-flight. Every claim mints a fresh claim_token; Mark/Release are
|
||||
// fenced on it. See the table comment in migration 123 / the lark
|
||||
// fenced on it. See the table comment in migration 124 / the lark
|
||||
// predecessor for the full invariant set.
|
||||
func (q *Queries) ClaimChannelInboundDedup(ctx context.Context, arg ClaimChannelInboundDedupParams) (ChannelInboundMessageDedup, error) {
|
||||
row := q.db.QueryRow(ctx, claimChannelInboundDedup, arg.InstallationID, arg.MessageID)
|
||||
@@ -933,7 +933,7 @@ type UpsertChannelInstallationParams struct {
|
||||
}
|
||||
|
||||
// Platform-agnostic inbound channel queries (MUL-3515). These operate on
|
||||
// the channel_* tables created in migration 123. Each installation carries
|
||||
// the channel_* tables created in migration 124. Each installation carries
|
||||
// a `channel_type` discriminator and a JSONB `config` blob for
|
||||
// platform-specific identifiers/credentials; the cross-platform columns
|
||||
// stay flat. The Go layer owns building/parsing config — these queries
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- Platform-agnostic inbound channel queries (MUL-3515). These operate on
|
||||
-- the channel_* tables created in migration 123. Each installation carries
|
||||
-- the channel_* tables created in migration 124. Each installation carries
|
||||
-- a `channel_type` discriminator and a JSONB `config` blob for
|
||||
-- platform-specific identifiers/credentials; the cross-platform columns
|
||||
-- stay flat. The Go layer owns building/parsing config — these queries
|
||||
@@ -209,7 +209,7 @@ WHERE chat_session_id = $1;
|
||||
-- claim is acquired (fresh insert, or stale-reclaim of an in-flight claim
|
||||
-- older than 60s); returns no rows when terminal (processed) or actively
|
||||
-- in-flight. Every claim mints a fresh claim_token; Mark/Release are
|
||||
-- fenced on it. See the table comment in migration 123 / the lark
|
||||
-- fenced on it. See the table comment in migration 124 / the lark
|
||||
-- predecessor for the full invariant set.
|
||||
INSERT INTO channel_inbound_message_dedup (installation_id, message_id, claim_token)
|
||||
VALUES ($1, $2, gen_random_uuid())
|
||||
|
||||
Reference in New Issue
Block a user