Docs: Convert a column from text to json

In response to
https://github.com/airblade/paper_trail/issues/600
.  Maybe other people will have the same question.

[ci skip]
This commit is contained in:
Jared Beck 2015-08-31 02:44:29 -04:00
parent 5187a714a0
commit a1108a66d3
1 changed files with 11 additions and 0 deletions

View File

@ -1137,6 +1137,17 @@ end
Note: You don't need to use a particular serializer for the PostgreSQL `JSON`
column type.
#### Convert a column from text to json
Postgres' `alter column` command will not automatically convert a `text`
column to `json`, but it can still be done with plain SQL.
```sql
alter table versions
alter column object type json
using object::json;
```
## SerializedAttributes support
PaperTrail has a config option that can be used to enable/disable whether