1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2025 SyncMyOrders Sp. z o.o.
// SPDX-License-Identifier: AGPL-3.0-or-later
//! Database migrations for runtara-core.
//!
//! This module exposes embedded migrations that can be run programmatically.
//! Products embedding runtara-core can call these functions to set up the database schema.
//!
//! # Example
//!
//! ```ignore
//! use sqlx::PgPool;
//! use runtara_core::migrations;
//!
//! let pool = PgPool::connect(&database_url).await?;
//! migrations::run_postgres(&pool).await?;
//! ```
use MigrateError;
/// PostgreSQL migrator with all core migrations embedded.
pub static POSTGRES: Migrator = migrate!;
/// SQLite migrator with all core migrations embedded.
pub static SQLITE: Migrator = migrate!;
/// Run PostgreSQL migrations.
///
/// Applies all pending migrations to the database. Safe to call multiple times;
/// already-applied migrations are skipped.
pub async
/// Run SQLite migrations.
///
/// Applies all pending migrations to the database. Safe to call multiple times;
/// already-applied migrations are skipped.
pub async