Line data Source code
1 : // @generated automatically by Diesel CLI.
2 :
3 : pub mod sql_types {
4 0 : #[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
5 : #[diesel(postgres_type(name = "pg_lsn", schema = "pg_catalog"))]
6 : pub struct PgLsn;
7 : }
8 :
9 0 : diesel::table! {
10 0 : controllers (address, started_at) {
11 0 : address -> Varchar,
12 0 : started_at -> Timestamptz,
13 0 : }
14 0 : }
15 :
16 0 : diesel::table! {
17 0 : metadata_health (tenant_id, shard_number, shard_count) {
18 0 : tenant_id -> Varchar,
19 0 : shard_number -> Int4,
20 0 : shard_count -> Int4,
21 0 : healthy -> Bool,
22 0 : last_scrubbed_at -> Timestamptz,
23 0 : }
24 0 : }
25 :
26 0 : diesel::table! {
27 0 : nodes (node_id) {
28 0 : node_id -> Int8,
29 0 : scheduling_policy -> Varchar,
30 0 : listen_http_addr -> Varchar,
31 0 : listen_http_port -> Int4,
32 0 : listen_pg_addr -> Varchar,
33 0 : listen_pg_port -> Int4,
34 0 : availability_zone_id -> Varchar,
35 0 : listen_https_port -> Nullable<Int4>,
36 0 : lifecycle -> Varchar,
37 0 : }
38 0 : }
39 :
40 0 : diesel::table! {
41 0 : safekeeper_timeline_pending_ops (tenant_id, timeline_id, sk_id) {
42 0 : sk_id -> Int8,
43 0 : tenant_id -> Varchar,
44 0 : timeline_id -> Varchar,
45 0 : generation -> Int4,
46 0 : op_kind -> Varchar,
47 0 : }
48 0 : }
49 :
50 0 : diesel::table! {
51 0 : safekeepers (id) {
52 0 : id -> Int8,
53 0 : region_id -> Text,
54 0 : version -> Int8,
55 0 : host -> Text,
56 0 : port -> Int4,
57 0 : http_port -> Int4,
58 0 : availability_zone_id -> Text,
59 0 : scheduling_policy -> Varchar,
60 0 : https_port -> Nullable<Int4>,
61 0 : }
62 0 : }
63 :
64 0 : diesel::table! {
65 0 : tenant_shards (tenant_id, shard_number, shard_count) {
66 0 : tenant_id -> Varchar,
67 0 : shard_number -> Int4,
68 0 : shard_count -> Int4,
69 0 : shard_stripe_size -> Int4,
70 0 : generation -> Nullable<Int4>,
71 0 : generation_pageserver -> Nullable<Int8>,
72 0 : placement_policy -> Varchar,
73 0 : splitting -> Int2,
74 0 : config -> Text,
75 0 : scheduling_policy -> Varchar,
76 0 : preferred_az_id -> Nullable<Varchar>,
77 0 : }
78 0 : }
79 :
80 0 : diesel::table! {
81 0 : timeline_imports (tenant_id, timeline_id) {
82 0 : tenant_id -> Varchar,
83 0 : timeline_id -> Varchar,
84 0 : shard_statuses -> Jsonb,
85 0 : }
86 0 : }
87 :
88 0 : diesel::table! {
89 0 : use diesel::sql_types::*;
90 0 : use super::sql_types::PgLsn;
91 0 :
92 0 : timelines (tenant_id, timeline_id) {
93 0 : tenant_id -> Varchar,
94 0 : timeline_id -> Varchar,
95 0 : start_lsn -> PgLsn,
96 0 : generation -> Int4,
97 0 : sk_set -> Array<Nullable<Int8>>,
98 0 : new_sk_set -> Nullable<Array<Nullable<Int8>>>,
99 0 : cplane_notified_generation -> Int4,
100 0 : deleted_at -> Nullable<Timestamptz>,
101 0 : }
102 0 : }
103 :
104 : diesel::allow_tables_to_appear_in_same_query!(
105 : controllers,
106 : metadata_health,
107 : nodes,
108 : safekeeper_timeline_pending_ops,
109 : safekeepers,
110 : tenant_shards,
111 : timeline_imports,
112 : timelines,
113 : );
|