···11+#!/bin/bash
22+migrate -path migrations -database "postgres://xcvr:secret@localhost:15432/xcvrdb?sslmode=disable" down
+2
migrateup
···11+#!/bin/bash
22+migrate -path migrations -database "postgres://xcvr:secret@localhost:15432/xcvrdb?sslmode=disable" up
+10
migrations/001_init.up.sql
···11+CREATE TABLE channels (
22+ uri TEXT PRIMARY KEY,
33+ cid TEXT NOT NULL,
44+ did TEXT NOT NULL,
55+ host TEXT NOT NULL,
66+ title TEXT NOT NULL,
77+ topic TEXT,
88+ created_at TIMESTAMPTZ NOT NULL,
99+ indexed_at TIMESTAMPTZ NOT NULL DEFAULT now()
1010+);