destinations
ModuleThe destinations resources are imported into.
Contents
8 submodules.
destinations::appwrite
Own pageAn Appwrite project as the destination: databases are written straight to the project's databases, the rest through the Appwrite API or the platform database.
use utopia_migration::destinations::appwrite::Appwrite;pub struct AppwriteAn Appwrite project as a destination.
Debug.use utopia_migration::destinations::appwrite::Options;pub struct OptionsThe arguments of Appwrite::new beyond the connection.
pub type DsnResolver = Arc<dyn Fn(&ResourceRef) -> String + Send + Sync>Resolves the DSN written into a migrated database's database
attribute on the destination.
destinations::appwrite::api
Own pageUsers, teams, storage, functions, messaging, sites and rules, written through the Appwrite API.
destinations::appwrite::project
Own pageProject settings, integrations, auth settings and project variables, written to the platform and project databases.
destinations::appwrite::schema
Own pageDatabases, tables, columns, indexes and rows, written to the project's databases.
destinations::csv
Own pageRows exported to a CSV file.
use utopia_migration::destinations::csv::Csv;pub struct CsvRows of one table exported to <directory>/<filename>.csv on a storage
device. Each imported batch writes a header line (when headers are on)
and one line per row; values are converted to text (null, true,
false, arrays as JSON or their $id). Destination::shutdown copies
the file to the device.
Debug.use utopia_migration::destinations::csv::CsvOptions;pub struct CsvOptionsCSV formatting options.
Default.destinations::json
Own pageRows exported to a JSON file.
use utopia_migration::destinations::json::Json;pub struct JsonRows of one table exported to <directory>/<filename>.json on a storage
device: a JSON array of objects with $id, $permissions, $createdAt
and $updatedAt first. Batches are written to a local temporary file;
Destination::shutdown closes the array and copies it to the device.
Debug.use utopia_migration::destinations::json::sanitize_filename;pub fn sanitize_filename(filename: &str) -> StringOf the CSV and JSON destinations: :/<>"|*? and
bytes outside printable ASCII become _, the result is trimmed, and an
empty result (or "0") is export.
destinations::local
Own pageA backup in a local directory.
use utopia_migration::destinations::local::Local;pub struct LocalA backup in a local directory: every resource's JSON in backup.json
(by group and type, rewritten after each resource), files under
files/, deployment archives in deployments/.
Debug.destinations::on_duplicate
Own pageWhat a destination does with a resource it already has.
use utopia_migration::OnDuplicate;pub enum OnDuplicateHow a destination treats resources that already exist on it.
use utopia_migration::SchemaAction;pub enum SchemaActionWhat to do with a schema resource (database, table, column, index): create it, leave the existing one, or update it.