Implement migration
This commit is contained in:
parent
7eb6d2d37e
commit
7738e9bde2
|
@ -34,4 +34,6 @@ get '/view', sub ($c) {
|
|||
|
||||
app->secrets(app->config->{'secrets'}) || die $@;
|
||||
|
||||
app->pg->migrations->from_dir('migrations')->migrate();
|
||||
|
||||
app->start();
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE threads;
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE IF NOT EXISTS threads (
|
||||
thread_id SERIAL PRIMARY KEY,
|
||||
thread_date TIMESTAMPTZ DEFAULT now(),
|
||||
thread_author VARCHAR(64),
|
||||
thread_title VARCHAR(256),
|
||||
thread_body VARCHAR(4096),
|
||||
hidden_status BOOLEAN NOT NULL,
|
||||
flagged_status BOOLEAN NOT NULL
|
||||
);
|
Loading…
Reference in a new issue