postgres

package
v0.0.0-...-c99d64b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Setup postgres database for mediateq

First, you will need to install PostgreSQL on your system. Then follow the following steps to setup your mediateq database.

1. Connected to the PostgreSQL server

sudo -u postgres psql

2. Create a new database

CREATE DATABASE [DATABASE_NAME];

Here DATABASE_NAME is the name of the database. The default name in the configuration file is mediateq.

3. Create a new user for the database,

CREATE USER [DATABASE_USER] WITH PASSWORD '[DATABASE_USER_PASSWORD]';

4. Grant the new user privileges to access the database

GRANT ALL PRIVILEGES ON [DATABASE_NAME] mydatabase TO [DATABASE_USER];

5. Create database tables

psql -U [DATABASE_USER] -d [DATABASE_NAME] -f /path/to/mediateq/database/postgres/schema.sql

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(cfg *config.Database) (*schema.Database, error)

NewDatabase create a new postgres database

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL