mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 00:09:35 +00:00
fixes https://github.com/openobserve/openobserve/issues/6621 This separates the functions which execute ddl statements, and only runs them if certain entry in meta is mis-matching with what we have in our code. Introduces a new env var `ZO_META_DDL_DSN` , which is optional and falls back to the original DSN if not specified. Added a new client to Postgres and Mysql both which uses this DDL DSN, and that is used only for the ddl statements. Also added another command to cli `upgrade-db` which runs the db initialization functions. For sqlite, there is no change, as it does not have concept of users. Primarily tested on Postgres to validate that the behavior with read-write and admin users is as expected. `DB_SCHEMA_VERSION` is hardcoded in code, and devs are expected to manually uptick it everytime we do any changes to db schema, similar to how we maintain ofga. --------- Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com> Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com> Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
37 lines
1.1 KiB
Rust
37 lines
1.1 KiB
Rust
// Copyright 2025 OpenObserve Inc.
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#![feature(async_drop)]
|
|
#![feature(btree_cursors)]
|
|
#![feature(btree_extract_if)]
|
|
|
|
#[cfg(feature = "enterprise")]
|
|
pub mod cipher;
|
|
pub mod cli;
|
|
pub mod common;
|
|
pub mod handler;
|
|
pub mod job;
|
|
pub mod migration;
|
|
pub mod router;
|
|
pub mod service;
|
|
|
|
#[cfg(feature = "enterprise")]
|
|
pub mod super_cluster_queue;
|
|
|
|
pub(crate) static USER_AGENT_REGEX_FILE: &[u8] = include_bytes!(concat!(
|
|
env!("CARGO_MANIFEST_DIR"),
|
|
"/ua_regex/regexes.yaml"
|
|
));
|