Just a simple site to publish surveys. Nothing fancy, mostly done because I need it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
survey-site/migrations/20260805143821_surveys.sql

22 lines
535 B

-- +goose Up
-- +goose StatementBegin
CREATE TABLE question (
id INTEGER PRIMARY KEY,
question TEXT UNIQUE NOT NULL,
result INTEGER DEFAULT 0);
CREATE TABLE survey (
id INTEGER PRIMARY KEY,
title TEXT UNIQUE NOT NULL,
description TEXT UNIQUE NOT NULL,
created_on DATETIME DEFAULT CURRENT_TIMESTAMP,
respondents INTEGER DEFAULT 0,
active BOOLEAN INTEGER DEFAULT false);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS question;
DROP TABLE IF EXISTS survey;
-- +goose StatementEnd