sapling/bonsai-hg-mapping/schemas/sqlite-bonsai-hg-mapping.sql
Pavel Aslanov fcb58cf972 sql mapping between {Bonsai|Hg} changesets
Summary:
We need to store relation between Hg changesets and Bonsai changesets.
- `BonsaiHgMapping` is exactly this mapping which establishes injective relation between `{Hg|Bonsai}Changeset`

Reviewed By: StanislavGlebik

Differential Revision: D8801254

fbshipit-source-id: c7df14172e6c2d67c039a24e1bb821e6d92860af
2018-07-11 09:07:13 -07:00

8 lines
188 B
SQL

CREATE TABLE bonsai_hg_mapping (
repo_id INTEGER NOT NULL,
hg_cs_id BINARY(20) NOT NULL,
bcs_id BINARY(32) NOT NULL,
UNIQUE (repo_id, hg_cs_id),
PRIMARY KEY (repo_id, bcs_id)
);