ls-deno/db-migrations.ts
2022-09-27 15:49:41 -05:00

14 lines
351 B
TypeScript

import { query } from "./db.ts";
await query(`
create extension if not exists "uuid-ossp";
drop table if exists notes;
create table if not exists notes (
id uuid primary key default uuid_generate_v4(),
content text not null,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
`);