Skip to content

Commit

Permalink
Introduce new DB schema and new migration set.
Browse files Browse the repository at this point in the history
  • Loading branch information
ofux authored and AnthonyBuisset committed Sep 29, 2023
1 parent 8fb48b8 commit 1748a94
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions new-github-indexer/infrastructure/diesel.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[print_schema]
file = "new-github-indexer/infrastructure/src/adapters/postgres_clean_storage/schema.rs"
schema = "indexer_clean"
custom_type_derives = ["diesel::query_builder::QueryId"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop schema indexer_clean;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create schema indexer_clean;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop table indexer_clean.repos;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
create table indexer_clean.repos
(
repo_id bigint primary key,
value jsonb not null
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// @generated automatically by Diesel CLI.

pub mod indexer_clean {
diesel::table! {
indexer_clean.repos (repo_id) {
repo_id -> Int8,
value -> Jsonb,
}
}
}
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ use_field_init_shorthand = true
# Ignore generated files
ignore = [
"common/infrastructure/src/database/schema.rs",
"new-github-indexer/infrastructure/src/adapters/postgres_clean_storage/schema.rs"
]

0 comments on commit 1748a94

Please sign in to comment.