Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
1d485ddb
D
Dak
项目概览
喜羊羊3508
/
Dak
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1d485ddb
编写于
1月 25, 2001
作者:
J
James Troup
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add override stuff to SQL files.
上级
6c68616c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
1 deletion
+51
-1
add_constraints.sql
add_constraints.sql
+23
-1
docs/.cvsignore
docs/.cvsignore
+1
-0
init_pool.sql
init_pool.sql
+27
-0
未找到文件。
add_constraints.sql
浏览文件 @
1d485ddb
-- Fix up after population of
f
the database...
-- Fix up after population of the database...
-- First of all readd the constraints (takes ~1:30 on auric)
...
...
@@ -24,6 +24,12 @@ ALTER TABLE bin_associations ADD CONSTRAINT bin_associations_bin FOREIGN KEY (bi
ALTER
TABLE
src_associations
ADD
CONSTRAINT
src_associations_suite
FOREIGN
KEY
(
suite
)
REFERENCES
suite
(
id
)
MATCH
FULL
;
ALTER
TABLE
src_associations
ADD
CONSTRAINT
src_associations_source
FOREIGN
KEY
(
source
)
REFERENCES
source
(
id
)
MATCH
FULL
;
ALTER
TABLE
override
ADD
CONSTRAINT
override_suite
FOREIGN
KEY
(
suite
)
REFERENCES
suite
(
id
)
MATCH
FULL
;
ALTER
TABLE
override
ADD
CONSTRAINT
override_component
FOREIGN
KEY
(
component
)
REFERENCES
component
(
id
)
MATCH
FULL
;
ALTER
TABLE
override
ADD
CONSTRAINT
override_priority
FOREIGN
KEY
(
priority
)
REFERENCES
priority
(
id
)
MATCH
FULL
;
ALTER
TABLE
override
ADD
CONSTRAINT
override_section
FOREIGN
KEY
(
section
)
REFERENCES
section
(
id
)
MATCH
FULL
;
ALTER
TABLE
override
ADD
CONSTRAINT
override_type
FOREIGN
KEY
(
type
)
REFERENCES
override_type
(
id
)
MATCH
FULL
;
-- Then correct all the id SERIAL PRIMARY KEY columns...
CREATE
FUNCTION
files_id_max
()
RETURNS
INT4
...
...
@@ -44,6 +50,15 @@ CREATE FUNCTION binaries_id_max() RETURNS INT4
CREATE
FUNCTION
bin_associations_id_max
()
RETURNS
INT4
AS
'SELECT max(id) FROM bin_associations'
LANGUAGE
'sql'
;
CREATE
FUNCTION
section_id_max
()
RETURNS
INT4
AS
'SELECT max(id) FROM section'
LANGUAGE
'sql'
;
CREATE
FUNCTION
priority_id_max
()
RETURNS
INT4
AS
'SELECT max(id) FROM priority'
LANGUAGE
'sql'
;
CREATE
FUNCTION
override_type_id_max
()
RETURNS
INT4
AS
'SELECT max(id) FROM override_type'
LANGUAGE
'sql'
;
SELECT
setval
(
'files_id_seq'
,
files_id_max
());
SELECT
setval
(
'source_id_seq'
,
source_id_max
());
...
...
@@ -51,6 +66,9 @@ SELECT setval('src_associations_id_seq', src_associations_id_max());
SELECT
setval
(
'dsc_files_id_seq'
,
dsc_files_id_max
());
SELECT
setval
(
'binaries_id_seq'
,
binaries_id_max
());
SELECT
setval
(
'bin_associations_id_seq'
,
bin_associations_id_max
());
SELECT
setval
(
'section_id_seq'
,
section_id_max
());
SELECT
setval
(
'priority_id_seq'
,
priority_id_max
());
SELECT
setval
(
'override_type_id_seq'
,
override_type_id_max
());
-- Vacuum the tables for efficency
...
...
@@ -67,6 +85,10 @@ VACUUM suite;
VACUUM
suite_architectures
;
VACUUM
bin_associations
;
VACUUM
src_associations
;
VACUUM
section
;
VACUUM
priority
;
VACUUM
override_type
;
VACUUM
override
;
-- FIXME: has to be a better way to do this
GRANT
ALL
ON
...
...
docs/.cvsignore
浏览文件 @
1d485ddb
manpage.*
*.1
init_pool.sql
浏览文件 @
1d485ddb
...
...
@@ -106,3 +106,30 @@ CREATE TABLE src_associations (
source
INT4
NOT
NULL
,
-- REFERENCES source
unique
(
suite
,
source
)
);
CREATE
TABLE
section
(
id
SERIAL
PRIMARY
KEY
,
section
TEXT
UNIQUE
NOT
NULL
);
CREATE
TABLE
priority
(
id
SERIAL
PRIMARY
KEY
,
priority
TEXT
UNIQUE
NOT
NULL
,
level
INT4
UNIQUE
NOT
NULL
);
CREATE
TABLE
override_type
(
id
SERIAL
PRIMARY
KEY
,
type
TEXT
UNIQUE
NOT
NULL
);
CREATE
TABLE
override
(
package
TEXT
NOT
NULL
,
suite
INT4
NOT
NULL
,
-- references suite
component
INT4
NOT
NULL
,
-- references component
priority
INT4
,
-- references priority
section
INT4
NOT
NULL
,
-- references section
type
INT4
NOT
NULL
,
-- references override_type
maintainer
TEXT
,
unique
(
suite
,
component
,
package
,
type
)
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录