Coder Social home page Coder Social logo

caracol's Introduction

Caracol

Caracol is a service for aggregating time series from external data systems.

Database

Creating the database and initial users

Create a database and a user that has permissions to access it.

The following sql is an example that creates a database and a user called caracol:

-- Create the database
CREATE DATABASE caracol;

-- Create the owner role
CREATE ROLE caracol;
GRANT caracol TO postgres;

ALTER DATABASE caracol OWNER TO caracol;
GRANT ALL PRIVILEGES ON SCHEMA public TO caracol;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO caracol;

-- The following is run substituting the passwords 
-- ALTER ROLE caracol WITH LOGIN PASSWORD '<replace me>';
ALTER ROLE caracol_ro WITH LOGIN PASSWORD '<replace me>';

Creating and updating the schema

This project uses tern to manage the database schema.

Install using go install github.com/jackc/tern/v2@latest

To update the database to the latest schema run tern migrate in the migrations directory.

Supply database details through environment variables or on the command line:

tern migrate --conn-string postgres://user:password@hostname:5432/caracol?sslmode=disable

caracol's People

Contributors

iand avatar web3-bot avatar dependabot[bot] avatar guillaumemichel avatar dennis-tra avatar

Watchers

Piotr Galar avatar  avatar  avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.