"Fossies" - the Fresh Open Source Software Archive

Member "cells-2.3.6/idm/acl/migrations/sqlite3/0.1.sql" (15 Sep 2021, 1122 Bytes) of package /linux/misc/pydio-cells-2.3.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PL/SQL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 -- +migrate Up
    2 CREATE TABLE IF NOT EXISTS idm_acl_nodes (
    3     id           INTEGER PRIMARY KEY AUTOINCREMENT,
    4     uuid         VARCHAR(500) NOT NULL
    5 );
    6 
    7 CREATE TABLE IF NOT EXISTS idm_acl_roles (
    8     id           INTEGER PRIMARY KEY AUTOINCREMENT,
    9     uuid         VARCHAR(500) NOT NULL
   10 );
   11 
   12 CREATE TABLE IF NOT EXISTS idm_acl_workspaces (
   13     id           INTEGER PRIMARY KEY AUTOINCREMENT,
   14     name         VARCHAR(500) NOT NULL
   15 );
   16 
   17 CREATE TABLE IF NOT EXISTS idm_acls (
   18     id           INTEGER PRIMARY KEY AUTOINCREMENT,
   19     node_id      INTEGER,
   20     action_name  VARCHAR(500),
   21     action_value VARCHAR(500),
   22     role_id      INTEGER,
   23     workspace_id INTEGER,
   24     created_at   TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   25     expires_at   TIMESTAMP NULL DEFAULT NULL,
   26 
   27     FOREIGN KEY (node_id) REFERENCES idm_acl_nodes(id),
   28     FOREIGN KEY (workspace_id) REFERENCES idm_acl_workspaces(id),
   29     FOREIGN KEY (role_id) REFERENCES idm_acl_roles(id),
   30 
   31     UNIQUE(node_id, action_name, role_id, workspace_id)
   32 );
   33 
   34 -- +migrate Down
   35 DROP TABLE idm_acl_nodes;
   36 DROP TABLE idm_acl_roles;
   37 DROP TABLE idm_acl_workspaces;
   38 DROP TABLE idm_acls;