namespace InvercargillSql.Orm { /** * Represents a column definition for both ORM mapping and migrations. * * ColumnDefinition contains the column name and type for runtime mapping, * as well as schema metadata used by the migrations system for DDL generation. * * When using the ORM with schema introspection (register_with_schema), the * schema metadata properties are discovered from the database rather than * being configured explicitly. */ public class ColumnDefinition : Object { /** * The name of the column in the database. */ public string name { get; set; } /** * The column type used for type conversion. */ public ColumnType column_type { get; set; } /** * Whether this column is the primary key. * Used by migrations for DDL generation. * Discovered via introspection when using register_with_schema. */ public bool is_primary_key { get; set; } /** * Whether this column auto-increments. * Used by migrations for DDL generation. * Discovered via introspection when using register_with_schema. */ public bool auto_increment { get; set; } /** * Whether this column is required (NOT NULL). * Used by migrations for DDL generation. * Discovered via introspection when using register_with_schema. */ public bool is_required { get; set; } /** * Whether this column has a unique constraint. * Used by migrations for DDL generation. */ public bool is_unique { get; set; } /** * Whether this column has an index. * Used by migrations for DDL generation. */ public bool has_index { get; set; } /** * Default value for this column. * Used by migrations for DDL generation. */ public Invercargill.Element? default_value { get; set; } /** * Whether this column defaults to the current timestamp. * Used by migrations for DDL generation. */ public bool default_now { get; set; } } }