Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/cassandra/schema.py
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | |||||
CREATE TABLE IF NOT EXISTS raw_extrinsic_metadata_by_id ( | CREATE TABLE IF NOT EXISTS raw_extrinsic_metadata_by_id ( | ||||
id blob, | id blob, | ||||
target text, | target text, | ||||
authority_type text, | authority_type text, | ||||
authority_url text, | authority_url text, | ||||
PRIMARY KEY ((id)) | PRIMARY KEY ((id)) | ||||
);""", | );""", | ||||
""" | """ | ||||
CREATE TABLE IF NOT EXISTS object_count ( | |||||
partition_key smallint, -- Constant, must always be 0 | |||||
object_type ascii, | |||||
count counter, | |||||
PRIMARY KEY ((partition_key), object_type) | |||||
);""", | |||||
""" | |||||
CREATE TABLE IF NOT EXISTS extid ( | CREATE TABLE IF NOT EXISTS extid ( | ||||
extid_type ascii, | extid_type ascii, | ||||
extid blob, | extid blob, | ||||
extid_version smallint, | extid_version smallint, | ||||
target_type ascii, | target_type ascii, | ||||
target blob, | target blob, | ||||
PRIMARY KEY ((extid_type, extid), extid_version, target_type, target) | PRIMARY KEY ((extid_type, extid), extid_version, target_type, target) | ||||
);""", | );""", | ||||
Show All 29 Lines | TABLES = [ | ||||
"release", | "release", | ||||
"directory", | "directory", | ||||
"directory_entry", | "directory_entry", | ||||
"snapshot", | "snapshot", | ||||
"snapshot_branch", | "snapshot_branch", | ||||
"origin_visit", | "origin_visit", | ||||
"origin", | "origin", | ||||
"raw_extrinsic_metadata", | "raw_extrinsic_metadata", | ||||
"object_count", | |||||
"origin_visit_status", | "origin_visit_status", | ||||
"metadata_authority", | "metadata_authority", | ||||
"metadata_fetcher", | "metadata_fetcher", | ||||
"extid", | "extid", | ||||
"extid_by_target", | "extid_by_target", | ||||
] | ] | ||||
HASH_ALGORITHMS = ["sha1", "sha1_git", "sha256", "blake2s256"] | HASH_ALGORITHMS = ["sha1", "sha1_git", "sha256", "blake2s256"] | ||||
Show All 13 Lines |