- Store message attachments in `projection_thread_messages.attachments_json` - Materialize base64 image attachments to `stateDir/attachments` during projection - Serve `/attachments/*` from the server and resolve preview URLs from WebSocket origin - Add migration and tests for projection materialization and attachment serving
12 lines
289 B
TypeScript
12 lines
289 B
TypeScript
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
import * as Effect from "effect/Effect";
|
|
|
|
export default Effect.gen(function* () {
|
|
const sql = yield* SqlClient.SqlClient;
|
|
|
|
yield* sql`
|
|
ALTER TABLE projection_thread_messages
|
|
ADD COLUMN attachments_json TEXT
|
|
`;
|
|
});
|