set inserted_at and updated_at null columns to epoch and add not null constraint
ADD
apps/omg_watcher/priv/repo/migrations/20190917165912_set_inserted_at_updated_at_to_epoc.exs
+defmodule OMG.Watcher.Repo.Migrations.SetInsertedAtUpdatedAtToEpoch do
+ use Ecto.Migration
+
+ def change do
+ execute("UPDATE txoutputs SET inserted_at = 'epoch' at time zone 'utc';")
+ execute("UPDATE txoutputs SET updated_at = 'epoch' at time zone 'utc';")
+ execute("ALTER TABLE txoutputs ALTER COLUMN inserted_at SET NOT NULL;")
+ execute("ALTER TABLE txoutputs ALTER COLUMN updated_at SET NOT NULL;")
+ end
+end

set inserted_at and updated_at null columns to epoch and add not null constraint