relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::migrations::MigrationOptions Struct Reference

Options for controlling migration generation. More...

#include <relx/migrations/diff.hpp>

Public Attributes

std::unordered_map< std::string, std::string > column_mappings
 Map of old column name to new column name for renames.
 
std::unordered_map< std::string, std::string > constraint_mappings
 Map of old constraint name to new constraint name for renames.
 
bool preserve_data = true
 Whether to preserve data during column type changes (default: true)
 
std::unordered_map< std::string, std::pair< std::string, std::string > > column_transformations
 Bidirectional SQL transformations for complex column changes Key: old column name, Value: {forward_sql, backward_sql} Forward: transforms old column data to new column format Backward: transforms new column data back to old column format (for rollback)
 

Detailed Description

Options for controlling migration generation.

Definition at line 26 of file diff.hpp.

Member Data Documentation

◆ column_mappings

std::unordered_map<std::string, std::string> relx::migrations::MigrationOptions::column_mappings

Map of old column name to new column name for renames.

Definition at line 28 of file diff.hpp.

◆ column_transformations

std::unordered_map<std::string, std::pair<std::string, std::string> > relx::migrations::MigrationOptions::column_transformations

Bidirectional SQL transformations for complex column changes Key: old column name, Value: {forward_sql, backward_sql} Forward: transforms old column data to new column format Backward: transforms new column data back to old column format (for rollback)

Definition at line 40 of file diff.hpp.

◆ constraint_mappings

std::unordered_map<std::string, std::string> relx::migrations::MigrationOptions::constraint_mappings

Map of old constraint name to new constraint name for renames.

Definition at line 31 of file diff.hpp.

◆ preserve_data

bool relx::migrations::MigrationOptions::preserve_data = true

Whether to preserve data during column type changes (default: true)

Definition at line 34 of file diff.hpp.


The documentation for this struct was generated from the following file: