Skip to content

Commit

Permalink
fix: add migration files without embedding to binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Sep 1, 2023
1 parent 864cc57 commit ad3ed6c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/license_headers_check.yml
Expand Up @@ -26,4 +26,5 @@ jobs:
-s=only \
-ignore '.github/workflows/*.yml' \
-ignore '.github/workflows/*.yaml' \
-ignore 'migrations/*.sql' \
.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -8,4 +8,4 @@ indexer.toml

# IDE files
.vscode/
migrations/
# migrations/
2 changes: 2 additions & 0 deletions migrations/20230901142040_cost_models.down.sql
@@ -0,0 +1,2 @@
-- Add down migration script here
DROP TABLE "CostModels";
8 changes: 8 additions & 0 deletions migrations/20230901142040_cost_models.up.sql
@@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS "CostModels"
(
id INT,
deployment VARCHAR NOT NULL,
model TEXT,
variables JSONB,
PRIMARY KEY( deployment )
);
2 changes: 1 addition & 1 deletion service/src/common/indexer_management_client/mod.rs
Expand Up @@ -16,7 +16,7 @@ pub struct QueryRoot;
#[derive(Debug, Clone)]
pub struct IndexerManagementClient {
database: PgPool, // Only referenced
client: Client, // it is Arc
client: Client, // it is Arc
}

impl IndexerManagementClient {
Expand Down
5 changes: 4 additions & 1 deletion service/src/server/routes/cost.rs
Expand Up @@ -11,5 +11,8 @@ pub(crate) async fn graphql_handler(
Extension(schema): Extension<CostSchema>,
Extension(server_options): Extension<ServerOptions>,
) -> GraphQLResponse {
schema.execute(req.into_inner().data(server_options)).await.into()
schema
.execute(req.into_inner().data(server_options))
.await
.into()
}

0 comments on commit ad3ed6c

Please sign in to comment.