File: create_database.oracle

package info (click to toggle)
phplib 2%3A7.2d-3.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,612 kB
  • ctags: 198
  • sloc: php: 6,095; pascal: 186; perl: 95; makefile: 78; sh: 6
file content (83 lines) | stat: -rw-r--r-- 3,301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- ============================================================
--   Nom de la base   :  myapp                                 
--   Nom de SGBD      :  ORACLE Version 7.x                    
--   Date de cration :  9/24/98  10:49 AM                     
-- ============================================================
-- $Id: create_database.oracle,v 1.1.1.1 2000/04/17 16:40:17 kk Exp $ 
--
-- Update: should also work on 8.x 

-- ============================================================
--   Table : ACTIVE_SESSIONS
-- ============================================================
create table ACTIVE_SESSIONS
(
    SID       VARCHAR2(32)           not null,
    NAME      VARCHAR2(32)           not null,
    VAL       LONG                   null    ,
    CHANGED   VARCHAR2(14)           not null,
    constraint PK_ACTIVE_SESSIONS primary key (SID, NAME)
)
/

-- ============================================================
--   Index : CHANGED                                           
-- ============================================================
create index CHANGED on ACTIVE_SESSIONS (CHANGED asc)
/

-- ============================================================
--   Table : ACTIVE_SESSIONS_SPLIT                                  
-- ============================================================
create table ACTIVE_SESSIONS_SPLIT
(
    CT_SID       VARCHAR2(32)           not null,
    CT_NAME      VARCHAR2(32)           not null,
    CT_POS       VARCHAR2(6)            not null,
    CT_VAL       LONG                   null    ,
    CT_CHANGED   VARCHAR2(14)           not null,
    constraint PK_ACTIVE_SESSIONS_SPLIT primary key (CT_SID, CT_NAME, CT_POS)
)
/

-- ============================================================
--   Index : CHANGED                                           
-- ============================================================
create index SCHANGED on ACTIVE_SESSIONS_SPLIT (CT_CHANGED asc)
/

-- ============================================================
--   Table : AUTH_USER                                         
-- ============================================================
create table AUTH_USER
(
    USER_ID   VARCHAR2(32)           not null,
    USERNAME  VARCHAR2(32)           not null,
    PASSWORD  VARCHAR2(32)           not null,
    PERMS     VARCHAR2(255)          null    ,
    constraint PK_AUTH_USER primary key (USER_ID)
)
/

-- ============================================================
--   Table : AUTH_USER_MD5
-- ============================================================
create table AUTH_USER_MD5
(
    USER_ID   VARCHAR2(32)           not null,
    USERNAME  VARCHAR2(32)           not null,
    PASSWORD  VARCHAR2(32)           not null,
    PERMS     VARCHAR2(255)          null    ,
    constraint PK_AUTH_USER_MD5 primary key (USER_ID)
)
/

-- ============================================================
--   Index : K_USERNAME                                        
-- ============================================================
create unique index K_USERNAME on AUTH_USER (USERNAME asc)
/

INSERT INTO auth_user VALUES ('c14cbf141ab1b7cd009356f555b607dc','kris','test','admin');
INSERT INTO auth_user_md5 VALUES ('c14cbf141ab1b7cd009356f555b607dc','kris','098f6bcd4621d373cade4e832627b4f6','admin');