mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* fix: correct HTTP error handling in gateway * refactor: migrate database and ORM to internal modules * feat: introduce taskfile build system for improved workflow management * refactor: update taskfiles to use relative paths * feat: add profile status field * refactor: move rendering logic to context package * fix: improve error handling in credentials retrieval * refactor: optimize HTTP request handling in Wasm environment * refactor: refactor config loading in motr command * chore: add process-compose for service management * chore: remove default task and update gum format command * fix: update project dependencies * refactor: improve code readability and maintainability * refactor: consolidate error handling components * refactor: update index handler to use new context package * refactor: consolidate database scripts and move to deploy directory * feat: Update flake.nix with development tools and environment configuration * fix: ignore flake.lock file * refactor: migrate build process to use taskfiles for improved modularity and maintainability * refactor: improve GatewayContext and reorganize handlers * refactor: Remove unused profile creation functions * (chore): templ generation * test: add test file for vaults.go * maintenance: remove defunct Discord server link * docs: update checks workflow documentation * test: remove obsolete vaults test file * refactor: move version bumping logic to release workflow
30 lines
1.1 KiB
SQL
30 lines
1.1 KiB
SQL
-- Connect to postgres default database
|
|
\c postgres;
|
|
|
|
-- Create databases
|
|
CREATE DATABASE chainindex;
|
|
CREATE DATABASE highway;
|
|
CREATE DATABASE matrixhs;
|
|
|
|
-- Create users with passwords
|
|
CREATE USER chainindex_user WITH PASSWORD 'chainindex_password123';
|
|
CREATE USER highway_user WITH PASSWORD 'highway_password123';
|
|
CREATE USER matrixhs_user WITH PASSWORD 'matrixhs_password123';
|
|
|
|
-- Grant privileges for each database to their respective users
|
|
\c chainindex;
|
|
GRANT ALL PRIVILEGES ON DATABASE chainindex TO chainindex_user;
|
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO chainindex_user;
|
|
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO chainindex_user;
|
|
|
|
\c highway;
|
|
GRANT ALL PRIVILEGES ON DATABASE highway TO highway_user;
|
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO highway_user;
|
|
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO highway_user;
|
|
|
|
\c matrixhs;
|
|
GRANT ALL PRIVILEGES ON DATABASE matrixhs TO matrixhs_user;
|
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO matrixhs_user;
|
|
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO matrixhs_user;
|
|
|