class Avram::Migrator::CreateSequenceStatement

Overview

Builds an SQL statement for creating a sequence using the given name appending "_seq". Additional options may be provided for extra customization.

Usage

CreateSequenceStatement.new(:accounts_number, if_not_exists: true, owned_by: "accounts.number").build
# => "CREATE SEQUENCE accounts_number_seq;"

Defined in:

avram/migrator/create_sequence_statement.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Constructor Detail

def self.new(name : String | Symbol, *, if_not_exists : Bool = false, owned_by : String = "NONE") #

[View source]

Instance Method Detail

def build #

[View source]