All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.postgres.migration.V1__create_tables.sql Maven / Gradle / Ivy

There is a newer version: 0.10.1
Show newest version
CREATE TABLE secrets (
  id SERIAL primary key,
  name text,
  secret text,
  version varchar(20),
  owner text,
  mode text,
  createdAt timestamp,
  updatedAt timestamp
  );

CREATE TABLE groups (
  id SERIAL primary key,
  name text unique,
  createdAt timestamp,
  updatedAt timestamp
  );

CREATE TABLE clients (
  id SERIAL primary key,
  name text unique,
  createdAt timestamp,
  updatedAt timestamp
  );

CREATE TABLE accessGrants (
  id SERIAL primary key,
  groupId int REFERENCES groups ON DELETE CASCADE,
  secretId int REFERENCES secrets ON DELETE CASCADE,
  createdAt timestamp,
  updatedAt timestamp
  );

CREATE TABLE memberships (
  id SERIAL primary key,
  groupId int REFERENCES groups ON DELETE CASCADE,
  clientId int REFERENCES clients ON DELETE CASCADE,
  createdAt timestamp,
  updatedAt timestamp
  );




© 2015 - 2025 Weber Informatics LLC | Privacy Policy