... | @@ -19,6 +19,14 @@ create_table :posts do |t| |
... | @@ -19,6 +19,14 @@ create_table :posts do |t| |
|
end
|
|
end
|
|
```
|
|
```
|
|
|
|
|
|
|
|
If you want to add a default value that is an array containing elements, you will need to enable the [`use_extended_defaults`](https://github.com/crashtech/torque-postgresql/wiki/Configuring#use_extended_defaults) setting. This is still experimental so use with precaution.
|
|
|
|
```ruby
|
|
|
|
create_table :posts do |t|
|
|
|
|
t.string :title
|
|
|
|
t.permissions :creator_permissions, array: true, default: %w(read write exec)
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
### The type Class
|
|
### The type Class
|
|
|
|
|
|
Each enum type loaded from the database will have its own class type of value for sets, created under the [`enum.namespace`](https://github.com/crashtech/torque-postgresql/wiki/Configuring#enum.namespace) namespace.
|
|
Each enum type loaded from the database will have its own class type of value for sets, created under the [`enum.namespace`](https://github.com/crashtech/torque-postgresql/wiki/Configuring#enum.namespace) namespace.
|
... | | ... | |