This is the backend for the ZMS Prototyp Bürgeramt project.
supabase link --project-ref 123qwertz
supabase start
To make realtime subscriptions to the tables work you need to run this sql query in the database:
-- See https://supabase.com/docs/guides/realtime/postgres-changes
BEGIN;
-- remove the supabase_realtime publication
DROP publication IF EXISTS supabase_realtime;
-- re-create the supabase_realtime publication with no tables
CREATE publication supabase_realtime;
COMMIT;
-- add a table to the publication
ALTER publication supabase_realtime
ADD TABLE processes;
ALTER TABLE processes REPLICA IDENTITY
FULL;
Adding the cron extension to the migrations did create some errors in local development. To fix this, the following steps are necessary:
When you have a remote database running got to the database settings under https://app.supabase.com/project/<YOUR PROJECT ID>/database/extensions
and enable the cron extension.
Then run the following SQL query in the database:
SELECT
cron.schedule ('update processes scores every minute', '* * * * *', $$
SELECT
public.compute_scores () $$);
This creates a new cronjob that runs the function public.compute_scores
every minute.
Before you create a pull request, write an issue so we can discuss your changes.
Thanks goes to these wonderful people (emoji key):
Fabian Morón Zirfas 📖 💻 🎨 🚇 🤔 |
Lucas Vogel 📖 🤔 👀 💻 |
Ingo Hinterding 📖 🤔 👀 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Texts and content available as CC BY.
Illustrations by Maria Musterfrau, all rights reserved.
Made by
|
A project by
|
Supported by
|