From: Matteo Nastasi (mop) Date: Thu, 27 Jan 2011 07:38:27 +0000 (+0100) Subject: sql contents and structure files added X-Git-Tag: 3.1.0~20 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=67f2611bf53de72c2e7d29db1f8e983238a97ca6 sql contents and structure files added --- diff --git a/sql/sql.d/001-struct.sql b/sql/sql.d/001-struct.sql new file mode 100644 index 0000000..a95af6b --- /dev/null +++ b/sql/sql.d/001-struct.sql @@ -0,0 +1,18 @@ +-- TODO +-- DONE - CASCADE ON DELETE of orders related tables +-- DONE - STATUS on orders + +DROP TABLE #PFX#users; +CREATE TABLE #PFX#users ( + code integer PRIMARY KEY, + login text, + pass text, + email text, + type integer + ); + +DROP TABLE #PFX#groups; +CREATE TABLE #PFX#groups ( + code integer PRIMARY KEY, + gname text + ); diff --git a/sql/sql.d/005-anagr.sql b/sql/sql.d/005-anagr.sql new file mode 100644 index 0000000..d97df09 --- /dev/null +++ b/sql/sql.d/005-anagr.sql @@ -0,0 +1,15 @@ +-- +-- Populate users db. +-- + +-- macro for user_flag bit-field +-- define(USER_FLAG_TY_ALL, 0x000f0000); // done +-- define(USER_FLAG_TY_NORM, 0x00010000); // done +-- define(USER_FLAG_TY_SUPER, 0x00020000); // done + +INSERT INTO #PFX#users VALUES (1, 'uno', md5('one'), 'uno@pluto.com', CAST (X'00020000' as integer)); +INSERT INTO #PFX#users VALUES (2, 'due', md5('two'), 'due@pluto.com', CAST (X'00010000' as integer)); +INSERT INTO #PFX#users VALUES (3, 'tre', md5('thr'), 'tre@pluto.com', CAST (X'00010000' as integer)); +INSERT INTO #PFX#users VALUES (4, 'qua', md5('for'), 'qua@pluto.com', CAST (X'00010000' as integer)); +INSERT INTO #PFX#users VALUES (5, 'cin', md5('fiv'), 'cin@pluto.com', CAST (X'00010000' as integer)); +