"Fossies" - the Fresh Open Source Software Archive

Member "cells-3.0.0/common/sql/resources/migrations/sqlite3/0.1.sql" (25 Oct 2021, 1418 Bytes) of package /linux/misc/pydio-cells-3.0.0.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. See also the latest Fossies "Diffs" side-by-side code changes report for "0.1.sql": 2.3.6_vs_3.0.0.

    1 /*
    2  * Copyright (c) 2019-2021. Abstrium SAS <team (at) pydio.com>
    3  * This file is part of Pydio Cells.
    4  *
    5  * Pydio Cells is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU Affero General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
    9  *
   10  * Pydio Cells is distributed in the hope that it will be useful,
   11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  * GNU Affero General Public License for more details.
   14  *
   15  * You should have received a copy of the GNU Affero General Public License
   16  * along with Pydio Cells.  If not, see <http://www.gnu.org/licenses/>.
   17  *
   18  * The latest code can be found at <https://pydio.com>.
   19  */
   20 
   21 -- +migrate Up
   22 CREATE TABLE IF NOT EXISTS %%PREFIX%% (
   23     id          INTEGER PRIMARY KEY AUTOINCREMENT,
   24     resource    VARCHAR(255) NOT NULL,
   25     action      VARCHAR(255) NOT NULL,
   26     subject     VARCHAR(255) NOT NULL,
   27     effect      VARCHAR(10) NOT NULL DEFAULT 'deny',
   28     conditions  VARCHAR(500) NOT NULL DEFAULT '{}'
   29 );
   30 CREATE INDEX IF NOT EXISTS idx_%%PREFIX%%_resource ON %%PREFIX%% (resource);
   31 CREATE INDEX IF NOT EXISTS idx_%%PREFIX%%_action ON %%PREFIX%% (action);
   32 CREATE INDEX IF NOT EXISTS idx_%%PREFIX%%_subject ON %%PREFIX%% (subject);
   33 
   34 -- +migrate Down
   35 DROP TABLE %%PREFIX%%;