DEVELOPMENT ENVIRONMENT

~liljamo/felu

645152b4671efab8a5ea16cdbbe364d5a387d173 — Jonni Liljamo 1 year, 1 month ago db9eeca
feat: users table, change domains table

this is breaking, but not currently in a released state so doesnt really matter
1 files changed, 10 insertions(+), 2 deletions(-)

M db/migrations.go
M db/migrations.go => db/migrations.go +10 -2
@@ 65,10 65,18 @@ func migrations() []string {
		fmt.Sprintf(`CREATE TABLE %s (
			schema_version INTEGER
		)`, migrationsTable),
		fmt.Sprintf(`CREATE TABLE domains (
		fmt.Sprintf(`CREATE TABLE users (
			id INTEGER NOT NULL PRIMARY KEY,
			email TEXT NOT NULL,
			pwd TEXT NOT NULL,
			is_admin INTEGER DEFAULT FALSE NOT NULL
		)`),
		fmt.Sprintf(`CREATE TABLE domains (
			id TEXT NOT NULL PRIMARY KEY,
			owner INTEGER NOT NULL,
			ddns_domain TEXT,
			a_record TEXT
			a_record TEXT,
			FOREIGN KEY(owner) REFERENCES users(id)
		)`),
	}
}