diff --git a/server/migrations/20250216175313_create_adresar_table.sql b/server/migrations/20250216175313_create_adresar_table.sql deleted file mode 100644 index 992b45a..0000000 --- a/server/migrations/20250216175313_create_adresar_table.sql +++ /dev/null @@ -1,24 +0,0 @@ --- Add migration script here -CREATE TABLE adresar ( - id BIGSERIAL PRIMARY KEY, - deleted BOOLEAN NOT NULL DEFAULT FALSE, - firma TEXT NOT NULL, - kz TEXT, - drc TEXT, - ulica TEXT, - psc TEXT, - mesto TEXT, - stat TEXT, - banka TEXT, - ucet TEXT, - skladm TEXT, - ico TEXT, - kontakt TEXT, - telefon TEXT, - skladu TEXT, - fax TEXT, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -CREATE INDEX idx_adresar_firma ON adresar (firma); -CREATE INDEX idx_adresar_mesto ON adresar (mesto); diff --git a/server/migrations/20250221164942_create_uctovnictvo_table.sql b/server/migrations/20250221164942_create_uctovnictvo_table.sql deleted file mode 100644 index 47c9784..0000000 --- a/server/migrations/20250221164942_create_uctovnictvo_table.sql +++ /dev/null @@ -1,22 +0,0 @@ --- Add migration script here -CREATE TABLE uctovnictvo ( - id BIGSERIAL PRIMARY KEY, - deleted BOOLEAN NOT NULL DEFAULT FALSE, - adresar_id BIGINT NOT NULL REFERENCES adresar(id), -- Link to adresar table - c_dokladu TEXT NOT NULL, - datum DATE NOT NULL, - c_faktury TEXT NOT NULL, - obsah TEXT, - stredisko TEXT, - c_uctu TEXT, - md TEXT, - identif TEXT, - poznanka TEXT, - firma TEXT NOT NULL, - created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP -); - -CREATE INDEX idx_uctovnictvo_adresar_id ON uctovnictvo (adresar_id); -CREATE INDEX idx_uctovnictvo_firma ON uctovnictvo (firma); -CREATE INDEX idx_uctovnictvo_c_dokladu ON uctovnictvo (c_dokladu); -CREATE INDEX idx_uctovnictvo_poznanka ON uctovnictvo (poznanka); diff --git a/server/src/auth/logic/rbac.rs b/server/src/auth/logic/rbac.rs index 20ce438..f309128 100644 --- a/server/src/auth/logic/rbac.rs +++ b/server/src/auth/logic/rbac.rs @@ -3,6 +3,8 @@ use tower::ServiceBuilder; use crate::auth::logic::rbac; +// TODO redesign this, adresar and uctovnictvo are nonexistent, but we are keeping this code for +// the reference. Please adjust in the future rbac. pub async fn run_server(db_pool: sqlx::PgPool) -> Result<(), Box> { // ... existing setup code ... diff --git a/server/src/indexer.rs b/server/src/indexer.rs index 2abd002..8b7d2d1 100644 --- a/server/src/indexer.rs +++ b/server/src/indexer.rs @@ -8,8 +8,6 @@ use tracing::{error, info, warn}; use tantivy::schema::Schema; use crate::search_schema; -const INDEX_DIR: &str = "./tantivy_indexes"; - /// Defines the commands that can be sent to the indexer task. #[derive(Debug)] pub enum IndexCommand { diff --git a/server/src/server/handlers.rs b/server/src/server/handlers.rs index 5f24b05..24f3c8b 100644 --- a/server/src/server/handlers.rs +++ b/server/src/server/handlers.rs @@ -1,4 +1,2 @@ // src/server/handlers.rs -pub use crate::server::services::adresar_service::AdresarService; -pub use crate::server::services::uctovnictvo_service::UctovnictvoService; pub use crate::server::services::table_structure_service::TableStructureHandler; diff --git a/server/src/server/run.rs b/server/src/server/run.rs index 7390f6e..5f181dd 100644 --- a/server/src/server/run.rs +++ b/server/src/server/run.rs @@ -6,8 +6,6 @@ use crate::indexer::{indexer_task, IndexCommand}; use common::proto::multieko2::FILE_DESCRIPTOR_SET; use crate::server::services::{ - AdresarService, - UctovnictvoService, TableStructureHandler, TableDefinitionService, TablesDataService, @@ -15,8 +13,6 @@ use crate::server::services::{ AuthServiceImpl }; use common::proto::multieko2::{ - adresar::adresar_server::AdresarServer, - uctovnictvo::uctovnictvo_server::UctovnictvoServer, table_structure::table_structure_service_server::TableStructureServiceServer, table_definition::table_definition_server::TableDefinitionServer, tables_data::tables_data_server::TablesDataServer, @@ -47,7 +43,7 @@ pub async fn run_server(db_pool: sqlx::PgPool) -> Result<(), Box Result<(), Box