Subversion Repositories general

Rev

Rev 13 | Rev 19 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 dev 1
--
11 dev 2
-- kickup sql tables
3 dev 3
--
4
 
5
create sequence hibernate_sequence;
6
 
9 dev 7
/* removed in this version
3 dev 8
create table participants
9
(
10
	id          integer                         not null,
11
	nick        varchar(255)                    not null,
12
	email       varchar(255)                    not null,
13
	name        varchar(255),
14
	phone       varchar(255),
15
	comment     text,
16
	mod_stamp   timestamp,
17
 
18
	constraint participants_prim  primary key (id),
19
	constraint participants_email unique(email)
20
);
9 dev 21
*/
3 dev 22
 
10 dev 23
create table acts
24
(
25
	id          integer                         not null,
26
	name        varchar(255)                    not null,
27
	comment     text,
28
	mod_stamp   timestamp,
29
 
30
	constraint acts_prim primary key (id),
31
	constraint acts_name unique(name)
32
);
33
 
34
create table apartments
35
(
36
	id          integer                         not null,
37
	name        varchar(255)                    not null,
38
	address     text,
39
	price       decimal,
40
	url         varchar(4000),
41
	comment     text,
42
	mod_stamp   timestamp,
43
 
44
	constraint apartments_prim primary key (id)
45
);
46
 
3 dev 47
create table events
48
(
49
	id              integer                     not null,
50
	name            varchar(255)                not null,
51
	place           varchar(255),
52
	address         text,
53
	transport_desc  text,
54
	start           date,
55
	stop            date,
56
	last_register   date,
57
	last_unregister date,
58
	price           decimal,
59
	money_account   text,
60
	enabled         char(1)                     default '1',
61
	comment         text,
62
	mod_stamp       timestamp,
63
 
64
	constraint events_prim primary key (id),
65
	constraint events_name unique(name)
66
);
67
 
14 dev 68
/*
3 dev 69
create table event_files
70
(
71
	id          integer                         not null,
72
	event       integer                         not null,
73
	name        varchar(255)                    not null,
74
	data        file,
75
	type        char(1),
76
	comment     text,
77
	mod_stamp   timestamp,
78
 
79
	constraint event_files_prim primary key (id)
80
);
14 dev 81
*/
3 dev 82
 
83
create table event_apartments
84
(
85
	id          integer                         not null,
86
	event       integer                         not null,
9 dev 87
	apartment   integer                         not null,
3 dev 88
	distance    decimal,
89
	comment     text,
90
	mod_stamp   timestamp,
91
 
9 dev 92
	constraint event_apartments_prim primary key (event, apartment)
3 dev 93
);
94
 
95
create table event_acts
96
(
97
	id          integer                         not null,
98
	event       integer                         not null,
99
	act         integer                         not null,
100
	comment     text,
101
	mod_stamp   timestamp,
102
 
103
	constraint event_acts_prim primary key (event, act)
104
);
105
 
9 dev 106
/* removed in this version
3 dev 107
create table participant_events
108
(
109
	participant       integer                   not null,
110
	event             integer                   not null,
111
	persons           integer,
112
	from_zip          varchar(10),
113
	from_city         varchar(10),
114
	departure         datetime,
115
	free_transport    integer,
116
	transport_comment integer,
117
	free_sleep        integer,
118
	sleep_comment     text,
9 dev 119
	payed             char(1)                   default ' ',
3 dev 120
	comment           text,
121
	mod_stamp         timestamp,
122
 
123
	constraint participant_events_prim primary key (participant, event)
124
);
9 dev 125
*/
3 dev 126
 
9 dev 127
create table participants
128
(
129
	id                integer                   not null,
130
	ident             varchar(255)              not null,
131
	nick              varchar(255)              not null,
132
	email             varchar(255)              not null,
133
	email_public      char(1)                   default ' ',
134
	name              varchar(255),
135
	phone             varchar(255),
136
	event             integer                   not null,
137
	persons           integer,
138
	from_zip          varchar(10),
139
	from_city         varchar(10),
140
	departure         timestamp,
141
	free_transport    integer,
142
	transport_comment text,
143
	free_sleep        integer,
144
	sleep_comment     text,
145
	payed             char(1)                   default ' ',
146
	comment           text,
147
	private_comment   text,
148
	mod_stamp         timestamp,
149
 
150
	constraint participants_prim  primary key (id),
151
	constraint participants_email unique(email)
152
);
153
 
14 dev 154
/*
3 dev 155
create table participant_acts
156
(
157
	participant   integer                       not null,
158
	event         integer                       not null,
159
	act           integer                       not null,
160
	comment       text,
161
	mod_stamp     timestamp,
162
 
163
	constraint participant_acts_prim primary key (participant, event, act)
164
);
14 dev 165
*/