1import * as Effect from "effect/Effect";
2import * as SqlClient from "effect/sql/SqlClient";
3
4export default Effect.gen(function* () {
5 const sql = yield* SqlClient.SqlClient;
6
7 // Later ordering indexes contain these exact column prefixes, so SQLite can
8 // serve the same lookups without maintaining a second B-tree on every write.
9 yield* sql`DROP INDEX IF EXISTS idx_projection_threads_project_id`;
10 yield* sql`DROP INDEX IF EXISTS idx_projection_thread_messages_thread_created`;
11 yield* sql`DROP INDEX IF EXISTS idx_projection_thread_activities_thread_sequence`;
12 yield* sql`DROP INDEX IF EXISTS idx_projection_turns_thread_requested`;
13});