feat: added ability to specify kind of target

This commit is contained in:
Jef Roosens 2022-06-17 13:45:21 +02:00
parent 10ad8297fb
commit bb5643bb03
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
6 changed files with 58 additions and 25 deletions

View file

@ -16,9 +16,13 @@ const (
migrations_up = [
$embed_file('migrations/001-initial/up.sql'),
$embed_file('migrations/002-rename-to-targets/up.sql'),
$embed_file('migrations/003-target-url-type/up.sql'),
]
migrations_down = [
$embed_file('migrations/001-initial/down.sql'),
$embed_file('migrations/002-rename-to-targets/down.sql'),
$embed_file('migrations/003-target-url-type/down.sql'),
]
migrations_down = [$embed_file('migrations/001-initial/down.sql'),
$embed_file('migrations/002-rename-to-targets/down.sql')]
)
// init initializes a database & adds the correct tables.

View file

@ -0,0 +1,4 @@
-- I'm not sure whether I should remove any non-git targets here. Keeping them
-- will result in invalid targets, but removing them means losing data.
ALTER TABLE Target DROP COLUMN kind;

View file

@ -0,0 +1 @@
ALTER TABLE Target ADD COLUMN kind TEXT NOT NULL DEFAULT 'git';