class

Avram::Migrator::CreateSequenceStatement

Inherits Reference < Object

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;"

Constructors

new(name : String | Symbol, *, if_not_exists : Bool = false, owned_by : String = "NONE")
Source

Instance methods

build
Source