If for some reason you need to create a UUID field for your schema (a non-primary key field), and you don't want to manage the creation of the value to store on the new database record, you can specify in the migration to use as default value the uuid_generate_v4() Postgresql method, so it will be auto-generated on the insert: defmodule App.Repo.Migrations.AddUuidFieldToUser do use Ecto.Migration
I wanted to have a case insensitive database column to store email address in the open source application I’m working on. I’m using PostgreSQL and there’s a nice extension that does exactly that - citext - so I gave it a try. I spent some time figuring things out so now I’m sharing the knowledge in this blog post. The instructions were tested in Elixir 1.5.3 / Phoenix 1.3.0 application. We start b
Postgres can store unstructured data such as arrays, json, and jsonb as of version 9.4. Ecto, Elixir’s database wrapper, provides first class support for serializing and deserializing Ecto structs and arrays into these native data types without sacrificing the expressiveness of Ecto models. Embedded records have all the things regular models have, such as structured fields, lifecycle callbacks, an
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く