25 lines
912 B
SQL
25 lines
912 B
SQL
create table if not exists research_council_lessons (
|
|
id bigserial primary key,
|
|
lesson_key text not null unique,
|
|
instrument_id bigint not null,
|
|
source_type text not null,
|
|
source_ref text not null,
|
|
lesson_type text not null,
|
|
symbol text null,
|
|
session_code text null,
|
|
setup_type text null,
|
|
model_code text null,
|
|
title text not null,
|
|
lesson_summary text not null,
|
|
tags jsonb not null default '[]'::jsonb,
|
|
priority_score double precision not null default 0,
|
|
payload jsonb not null default '{}'::jsonb,
|
|
created_ts timestamptz not null,
|
|
updated_ts timestamptz not null,
|
|
created_at timestamptz not null default now(),
|
|
updated_at timestamptz not null default now()
|
|
);
|
|
|
|
create index if not exists idx_research_council_lessons_scope
|
|
on research_council_lessons (instrument_id, session_code, setup_type, model_code, updated_ts desc, id desc);
|