···66 created_at timestamptz not null
77);
8899-create index blocks_did_index on blocks using hash (did);
1010-create index blocks_subject_index on blocks using hash (subject);
99+create index blocks_did_index on blocks (did);
1010+create index blocks_subject_index on blocks (subject);
11111212create table follows
1313(
···1717 created_at timestamptz not null
1818);
19192020-create index follow_did_index on follows using hash (did);
2121-create index follow_subject_index on follows using hash (subject);2020+create index follow_did_index on follows (did);
2121+create index follow_subject_index on follows (subject);
+2-2
migrations/2025-02-07-203450_lists/up.sql
···2525 indexed_at timestamp not null default now()
2626);
27272828-create index listitems_list_index on list_items using hash (list_uri);
2929-create index listitems_subject_index on list_items using hash (subject);
2828+create index listitems_list_index on list_items (list_uri);
2929+create index listitems_subject_index on list_items (subject);
30303131create table list_blocks
3232(
+10-10
migrations/2025-02-16-142357_posts/up.sql
···2222 indexed_at timestamp not null default now()
2323);
24242525-create index posts_did_index on posts using hash (did);
2626-create index posts_parent_index on posts using hash (parent_uri);
2727-create index posts_root_index on posts using hash (root_uri);
2525+create index posts_did_index on posts (did);
2626+create index posts_parent_index on posts (parent_uri);
2727+create index posts_root_index on posts (root_uri);
2828create index posts_lang_index on posts using gin (languages);
2929create index posts_tags_index on posts using gin (tags);
30303131create table post_embed_images
3232(
3333- post_uri text not null references posts (at_uri) on delete cascade,
3333+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
3434 seq smallint not null,
35353636 mime_type text not null,
···47474848create table post_embed_video
4949(
5050- post_uri text primary key references posts (at_uri) on delete cascade,
5050+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
51515252 mime_type text not null,
5353 cid text not null,
···61616262create table post_embed_video_captions
6363(
6464- post_uri text not null references posts (at_uri) on delete cascade,
6464+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
6565 language text not null,
66666767 mime_type text not null,
···74747575create table post_embed_ext
7676(
7777- post_uri text primary key references posts (at_uri) on delete cascade,
7777+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
78787979 uri text not null,
8080 title text not null,
···87878888create table post_embed_record
8989(
9090- post_uri text primary key references posts (at_uri) on delete cascade,
9090+ post_uri text primary key references posts (at_uri) on delete cascade deferrable,
91919292 record_type text not null,
9393 uri text not null,
···101101(
102102 at_uri text primary key,
103103 cid text not null,
104104- post_uri text not null references posts (at_uri) on delete cascade,
104104+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
105105106106 detached text[] not null,
107107 rules text[] not null,
···118118(
119119 at_uri text primary key,
120120 cid text not null,
121121- post_uri text not null references posts (at_uri) on delete cascade,
121121+ post_uri text not null references posts (at_uri) on delete cascade deferrable,
122122123123 hidden_replies text[] not null,
124124 allow text[] not null,
···88 indexed_at timestamp not null default now()
99);
10101111-create index likes_did_index on likes using hash (did);
1212-create index likes_subject_index on likes using hash (subject);
1111+create index likes_did_index on likes (did);
1212+create index likes_subject_index on likes (subject);
13131414create table reposts
1515(
···2121 indexed_at timestamp not null default now()
2222);
23232424-create index reposts_did_index on reposts using hash (did);
2525-create index reposts_post_index on reposts using hash (post);2424+create index reposts_did_index on reposts (did);
2525+create index reposts_post_index on reposts (post);
+2-2
migrations/2025-04-18-185717_verification/up.sql
···1212 indexed_at timestamp not null default now()
1313);
14141515-create index verification_verifier_index on verification using hash (verifier);
1616-create index verification_subject_index on verification using hash (subject);1515+create index verification_verifier_index on verification (verifier);
1616+create index verification_subject_index on verification (subject);
+8-2
parakeet-db/Cargo.toml
···5566[dependencies]
77chrono = { version = "0.4.39", features = ["serde"] }
88-diesel = { version = "2.2.6", features = ["chrono", "serde_json"] }
99-serde_json = "1.0.134"88+diesel = { version = "2.2.6", features = ["chrono", "serde_json"], optional = true }
99+postgres-types = { version = "0.2.9", optional = true }
1010+serde_json = "1.0.134"
1111+1212+[features]
1313+default = ["diesel"]
1414+diesel = ["dep:diesel"]
1515+postgres = ["dep:postgres-types"]
+2
parakeet-db/src/lib.rs
···11+#[cfg(feature = "diesel")]
12pub mod models;
33+#[cfg(feature = "diesel")]
24pub mod schema;
35pub mod types;