···6 created_at timestamptz not null
7);
89-create index blocks_did_index on blocks using hash (did);
10-create index blocks_subject_index on blocks using hash (subject);
1112create table follows
13(
···17 created_at timestamptz not null
18);
1920-create index follow_did_index on follows using hash (did);
21-create index follow_subject_index on follows using hash (subject);
···6 created_at timestamptz not null
7);
89+create index blocks_did_index on blocks (did);
10+create index blocks_subject_index on blocks (subject);
1112create table follows
13(
···17 created_at timestamptz not null
18);
1920+create index follow_did_index on follows (did);
21+create index follow_subject_index on follows (subject);
+2-2
migrations/2025-02-07-203450_lists/up.sql
···25 indexed_at timestamp not null default now()
26);
2728-create index listitems_list_index on list_items using hash (list_uri);
29-create index listitems_subject_index on list_items using hash (subject);
3031create table list_blocks
32(
···25 indexed_at timestamp not null default now()
26);
2728+create index listitems_list_index on list_items (list_uri);
29+create index listitems_subject_index on list_items (subject);
3031create table list_blocks
32(
+10-10
migrations/2025-02-16-142357_posts/up.sql
···22 indexed_at timestamp not null default now()
23);
2425-create index posts_did_index on posts using hash (did);
26-create index posts_parent_index on posts using hash (parent_uri);
27-create index posts_root_index on posts using hash (root_uri);
28create index posts_lang_index on posts using gin (languages);
29create index posts_tags_index on posts using gin (tags);
3031create table post_embed_images
32(
33- post_uri text not null references posts (at_uri) on delete cascade,
34 seq smallint not null,
3536 mime_type text not null,
···4748create table post_embed_video
49(
50- post_uri text primary key references posts (at_uri) on delete cascade,
5152 mime_type text not null,
53 cid text not null,
···6162create table post_embed_video_captions
63(
64- post_uri text not null references posts (at_uri) on delete cascade,
65 language text not null,
6667 mime_type text not null,
···7475create table post_embed_ext
76(
77- post_uri text primary key references posts (at_uri) on delete cascade,
7879 uri text not null,
80 title text not null,
···8788create table post_embed_record
89(
90- post_uri text primary key references posts (at_uri) on delete cascade,
9192 record_type text not null,
93 uri text not null,
···101(
102 at_uri text primary key,
103 cid text not null,
104- post_uri text not null references posts (at_uri) on delete cascade,
105106 detached text[] not null,
107 rules text[] not null,
···118(
119 at_uri text primary key,
120 cid text not null,
121- post_uri text not null references posts (at_uri) on delete cascade,
122123 hidden_replies text[] not null,
124 allow text[] not null,
···22 indexed_at timestamp not null default now()
23);
2425+create index posts_did_index on posts (did);
26+create index posts_parent_index on posts (parent_uri);
27+create index posts_root_index on posts (root_uri);
28create index posts_lang_index on posts using gin (languages);
29create index posts_tags_index on posts using gin (tags);
3031create table post_embed_images
32(
33+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
34 seq smallint not null,
3536 mime_type text not null,
···4748create table post_embed_video
49(
50+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
5152 mime_type text not null,
53 cid text not null,
···6162create table post_embed_video_captions
63(
64+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
65 language text not null,
6667 mime_type text not null,
···7475create table post_embed_ext
76(
77+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
7879 uri text not null,
80 title text not null,
···8788create table post_embed_record
89(
90+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
9192 record_type text not null,
93 uri text not null,
···101(
102 at_uri text primary key,
103 cid text not null,
104+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
105106 detached text[] not null,
107 rules text[] not null,
···118(
119 at_uri text primary key,
120 cid text not null,
121+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
122123 hidden_replies text[] not null,
124 allow text[] not null,
···8 indexed_at timestamp not null default now()
9);
1011-create index likes_did_index on likes using hash (did);
12-create index likes_subject_index on likes using hash (subject);
1314create table reposts
15(
···21 indexed_at timestamp not null default now()
22);
2324-create index reposts_did_index on reposts using hash (did);
25-create index reposts_post_index on reposts using hash (post);
···8 indexed_at timestamp not null default now()
9);
1011+create index likes_did_index on likes (did);
12+create index likes_subject_index on likes (subject);
1314create table reposts
15(
···21 indexed_at timestamp not null default now()
22);
2324+create index reposts_did_index on reposts (did);
25+create index reposts_post_index on reposts (post);
+2-2
migrations/2025-04-18-185717_verification/up.sql
···12 indexed_at timestamp not null default now()
13);
1415-create index verification_verifier_index on verification using hash (verifier);
16-create index verification_subject_index on verification using hash (subject);
···12 indexed_at timestamp not null default now()
13);
1415+create index verification_verifier_index on verification (verifier);
16+create index verification_subject_index on verification (subject);
+8-2
parakeet-db/Cargo.toml
···56[dependencies]
7chrono = { version = "0.4.39", features = ["serde"] }
8-diesel = { version = "2.2.6", features = ["chrono", "serde_json"] }
9-serde_json = "1.0.134"000000
···56[dependencies]
7chrono = { version = "0.4.39", features = ["serde"] }
8+diesel = { version = "2.2.6", features = ["chrono", "serde_json"], optional = true }
9+postgres-types = { version = "0.2.9", optional = true }
10+serde_json = "1.0.134"
11+12+[features]
13+default = ["diesel"]
14+diesel = ["dep:diesel"]
15+postgres = ["dep:postgres-types"]
+2
parakeet-db/src/lib.rs
···01pub mod models;
02pub mod schema;
3pub mod types;
···1+#[cfg(feature = "diesel")]
2pub mod models;
3+#[cfg(feature = "diesel")]
4pub mod schema;
5pub mod types;