* Add messages table to local clickhouse setup
Copied from production, using MergeTree() instead of
SharedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}').
This still only runs on a fresh setup (e.g. rm -rf .docker/clickhouse),
so it's a poor substitute for actual migrations.
* Update .docker/scripts/clickhouse/001-create-tables.sql
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Add local clickhouse url+password to development env
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Caveats / Deficiencies
This is not a perfect match for the server clickhouse config since we're
using MergeTree() as the engine. It seemed like it was going to be much
more complex to exactly match production, but I may have missed something
obvious.
The create tables sql only seems to be run on a completely fresh install.
* Replace date utils with library
* use drizzle-zod
* use drizzle types directly
* use server actions rather than routes
* slight refactor
* UI rollback on API failure
* slight refactor to reduce verbosity
* clean up
* Add database schema for audit logs
* update audit log code to read from the DB rather than mocks
* use UUID not text for id
* backend endpoint for writing audit logs
* add stubs for provider whitelist update
* wip on sending audit logs
* remove oldValue field
* remove references to oldValue
* more
* change toast
* move querying to the backend
* fix fetch
* base URL
* use a server-side function rather than endpoint for audit log creation
* remove old_value
* remove route for querying audit logs
* don't take over date parsing
* simplify, review feedback