- B
- C
- D
- E
- H
- I
- J
- L
- M
- N
- O
- P
- S
- T
- U
- X
Instance Public methods
bigserial(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 51
bit(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 55
bit_varying(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 59
box(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 131
cidr(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 63
circle(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 143
citext(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 67
daterange(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 71
enum(*names, **options) Link
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 178 define_column_methods :bigserial, :bit, :bit_varying, :cidr, :citext, :daterange, :hstore, :inet, :interval, :int4range, :int8range, :jsonb, :ltree, :macaddr, :money, :numrange, :oid, :point, :line, :lseg, :box, :path, :polygon, :circle, :serial, :tsrange, :tstzrange, :tsvector, :uuid, :xml, :timestamptz, :enum
hstore(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 75
inet(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 79
int4range(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 87
int8range(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 91
interval(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 83
jsonb(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 95
line(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 123
lseg(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 127
ltree(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 99
macaddr(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 103
money(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 107
numrange(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 111
oid(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 115
path(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 135
point(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 119
polygon(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 139
primary_key(name, type = :primary_key, **options) Link
Defines the primary key field. Use of the native PostgreSQL UUID type is supported, and can be used by defining your tables as such:
create_table :stuffs, id: :uuid do |t| t.string :content t.timestamps end
By default, this will use the gen_random_uuid() function.
To use a UUID primary key without any defaults, set the :default option to nil:
create_table :stuffs, id: false do |t| t.primary_key :id, :uuid, default: nil t.uuid :foo_id t.timestamps end
You may also pass a custom stored procedure that returns a UUID or use a different UUID generation function from another library.
Note that setting the UUID primary key default value to nil will require you to assure that you always provide a UUID value before saving a record (as primary keys cannot be nil). This might be done via the SecureRandom.uuid method and a before_save callback, for instance.
serial(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 147
timestamptz(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 171
tsrange(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 151
tstzrange(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 155
tsvector(*names, **options) Link
Source: on GitHub
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 159