Replace individual Rust migration modules with a define_sql_migrations macro that reads up/down SQL files via include_str!. Consolidate all legacy single-file SQL into per-table directories and add full schema migration coverage for 90+ tables.
28 lines
993 B
SQL
28 lines
993 B
SQL
create table if not exists pull_request
|
|
(
|
|
repo uuid not null,
|
|
number bigint not null,
|
|
issue uuid not null,
|
|
title varchar(255) not null,
|
|
body text,
|
|
author uuid not null,
|
|
base varchar(255) not null,
|
|
head varchar(255) not null,
|
|
status varchar(255) not null,
|
|
merged_by uuid,
|
|
created_at timestamp with time zone not null,
|
|
updated_at timestamp with time zone not null,
|
|
merged_at timestamp with time zone,
|
|
created_by_ai boolean default false not null,
|
|
primary key (repo, number)
|
|
);
|
|
|
|
create index if not exists idx_pull_request_repo
|
|
on pull_request (repo);
|
|
|
|
create index if not exists idx_pull_request_author
|
|
on pull_request (author);
|
|
|
|
create index if not exists idx_pull_request_status
|
|
on pull_request (status);
|