diff --git a/server/src/db/mod.rs b/server/src/db/mod.rs index 7a2d337..93e248f 100644 --- a/server/src/db/mod.rs +++ b/server/src/db/mod.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: GPL-3.0-Only +// Copyright (C) 2024 Luke Harding + use std::{env, error}; use diesel::{Connection, PgConnection}; @@ -5,7 +8,6 @@ use diesel::pg::Pg; use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness}; pub mod models; -pub mod schema; pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("./migrations"); diff --git a/server/src/db/models.rs b/server/src/db/models.rs index 9b26e0a..883eef0 100644 --- a/server/src/db/models.rs +++ b/server/src/db/models.rs @@ -6,7 +6,7 @@ use diesel::prelude::*; use uuid::Uuid; #[derive(Queryable, Selectable)] -#[diesel(table_name = crate::db::schema::tasks)] +#[diesel(table_name = crate::schema::tasks)] #[diesel(check_for_backend(diesel::pg::Pg))] pub struct Task { pub id: Uuid, diff --git a/server/src/main.rs b/server/src/main.rs index 4b265e8..7ee175e 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -7,6 +7,7 @@ use actix_web::{App, get, HttpResponse, HttpServer, Responder}; pub mod db; pub mod util; +pub mod schema; #[actix_web::main] async fn main() -> io::Result<()> { diff --git a/server/src/db/schema.rs b/server/src/schema.rs similarity index 100% rename from server/src/db/schema.rs rename to server/src/schema.rs