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