add unique constraints
This commit is contained in:
parent
ebe2c401ef
commit
bf7f5efa1e
7
Makefile
7
Makefile
|
@ -1,14 +1,11 @@
|
|||
pull:
|
||||
git pull
|
||||
|
||||
test:
|
||||
go test -cover ./...
|
||||
|
||||
deploy-service: pull test
|
||||
deploy-service: test
|
||||
go build -o gte-daemon ./cmd/daemon/service.go
|
||||
scp gte-daemon ewintr.nl:/home/erik/bin/gte-daemon
|
||||
ssh ewintr.nl /home/erik/bin/deploy-gte-daemon.sh
|
||||
|
||||
install-cli: pull test
|
||||
install-cli: test
|
||||
go build -o gte ./cmd/cli/main.go
|
||||
mv gte ${HOME}/bin
|
||||
|
|
|
@ -13,10 +13,10 @@ import (
|
|||
type sqliteMigration string
|
||||
|
||||
var sqliteMigrations = []sqliteMigration{
|
||||
`CREATE TABLE task ("id" TEXT, "version" INTEGER, "folder" TEXT, "action" TEXT, "project" TEXT, "due" TEXT, "recur" TEXT)`,
|
||||
`CREATE TABLE task ("id" TEXT UNIQUE, "version" INTEGER, "folder" TEXT, "action" TEXT, "project" TEXT, "due" TEXT, "recur" TEXT)`,
|
||||
`CREATE TABLE system ("latest_sync" INTEGER)`,
|
||||
`INSERT INTO system (latest_sync) VALUES (0)`,
|
||||
`CREATE TABLE local_id ("id" TEXT, "local_id" INTEGER)`,
|
||||
`CREATE TABLE local_id ("id" TEXT UNIQUE, "local_id" INTEGER UNIQUE)`,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue