class

Ralph::Migrations::Schema::Dialect::Postgres

Inherits Ralph::Migrations::Schema::Dialect::Base / Reference / Object

Instance methods

auto_increment_clause
Source
column_type(type : Symbol, options : Hash(Symbol, String | Int32 | Int64 | Float64 | Bool | Symbol | Nil)) : String
Source
identifier
Source
primary_key_definition(name : String, type : Symbol, default : String | Nil = nil) : String

Type-aware primary key definition

Generates primary key SQL for non-integer types like UUID or String.

Example

dialect.primary_key_definition("id", :uuid, "gen_random_uuid()")
# => "\"id\" UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid()"
Source
primary_key_definition(name : String) : String
Source