12 lines
257 B
MySQL
12 lines
257 B
MySQL
|
-- +goose Up
|
||
|
CREATE TABLE chirps (
|
||
|
id UUID PRIMARY KEY,
|
||
|
created_at TIMESTAMP NOT NULL,
|
||
|
updated_at TIMESTAMP NOT NULL,
|
||
|
body TEXT NOT NULL,
|
||
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE
|
||
|
);
|
||
|
|
||
|
-- +goose Down
|
||
|
DROP TABLE chirps;
|