Skip to content
Snippets Groups Projects
Commit 26760db8 authored by Martin Lees's avatar Martin Lees Committed by Howo
Browse files

fixes for hive_roles

parent 5ba3cece
No related branches found
No related tags found
1 merge request!539Update SetRole/SetUserTitle so that you have to be subscribed to get it, also...
......@@ -25,12 +25,12 @@ BEGIN
end if;
IF _role_id IS NOT NULL AND _title IS NULL THEN
INSERT INTO hive_roles(account_id, community_id, role_id, created_at)
INSERT INTO hivemind_app.hive_roles(account_id, community_id, role_id, created_at)
VALUES (_account_id, _community_id, _role_id, _created_at)
ON CONFLICT (account_id, community_id)
DO UPDATE SET role_id = _role_id;
ELSIF _title IS NOT NULL AND _role_id IS NULL THEN
INSERT INTO hive_roles(account_id, community_id, title, created_at)
INSERT INTO hivemind_app.hive_roles(account_id, community_id, title, created_at)
VALUES (_account_id, _community_id, _title, _created_at)
ON CONFLICT (account_id, community_id)
DO UPDATE SET title = _title;
......
from datetime import datetime
from typing import Final
import hive._version as generated
VERSION: Final[str] = generated.__version__
GIT_REVISION: Final[str] = generated.__git_revision__
GIT_DATE: Final[datetime] = datetime.fromisoformat(generated.__git_revision_date__)
VERSION: Final[str] = "1.0"
GIT_REVISION: Final[str] = "955ab9ab60bc99f42eee1f18d13882833acfabab"
GIT_DATE: Final[datetime] = datetime.fromisoformat("2023-05-31T17:32:23.000")
sudo pg_dropcluster 14 main --stop
sudo pg_createcluster 14 main
sudo systemctl restart postgresql.service
sudo -i -u postgres psql -c 'alter role postgres password null;'
sudo rm /etc/postgresql/14/main/pg_hba.conf
sudo rm /etc/postgresql/14/main/postgresql.conf
sudo cp /pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
sudo cp /postgresql.conf /etc/postgresql/14/main/postgresql.conf
sudo chmod 777 /etc/postgresql/14/main/postgresql.conf
sudo chmod 777 /etc/postgresql/14/main/pg_hba.conf
sudo systemctl restart postgresql.service
cd /home/martin/projects/hivemind/haf/scripts
sudo ./setup_postgres.sh
sudo ./setup_db.sh --haf-db-admin=postgres
pg_restore --section=pre-data --disable-triggers -h localhost -p 5432 -U postgres -d haf_block_log /home/martin/projects/hivemind/dump.dump
pg_restore -j 20 --section=data --disable-triggers -h localhost -p 5432 -U postgres -d haf_block_log /home/martin/projects/hivemind/dump.dump
pg_restore -h localhost -p 5432 -U postgres --section=post-data --disable-triggers --clean --if-exists -d haf_block_log /home/martin/projects/hivemind/dump.dump
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment