feat(core): initial implementation of syncing (#17814)
This commit is contained in:
parent
0c0c6f3bdb
commit
b0017bf1b9
32 changed files with 5227 additions and 2584 deletions
|
|
@ -0,0 +1,13 @@
|
|||
CREATE TABLE `event_sequence` (
|
||||
`aggregate_id` text PRIMARY KEY,
|
||||
`seq` integer NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `event` (
|
||||
`id` text PRIMARY KEY,
|
||||
`aggregate_id` text NOT NULL,
|
||||
`seq` integer NOT NULL,
|
||||
`type` text NOT NULL,
|
||||
`data` text NOT NULL,
|
||||
CONSTRAINT `fk_event_aggregate_id_event_sequence_aggregate_id_fk` FOREIGN KEY (`aggregate_id`) REFERENCES `event_sequence`(`aggregate_id`) ON DELETE CASCADE
|
||||
);
|
||||
1337
packages/opencode/migration/20260323234822_events/snapshot.json
Normal file
1337
packages/opencode/migration/20260323234822_events/snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue