sql contents and structure files added
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 27 Jan 2011 07:38:27 +0000 (08:38 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Thu, 27 Jan 2011 07:38:27 +0000 (08:38 +0100)
sql/sql.d/001-struct.sql [new file with mode: 0644]
sql/sql.d/005-anagr.sql [new file with mode: 0644]

diff --git a/sql/sql.d/001-struct.sql b/sql/sql.d/001-struct.sql
new file mode 100644 (file)
index 0000000..a95af6b
--- /dev/null
@@ -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 (file)
index 0000000..d97df09
--- /dev/null
@@ -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));
+