Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
faq
Commits
80225762
Commit
80225762
authored
Sep 18, 2019
by
Bertrand Gauthier
Browse files
Script SQL pour postgres
parent
c6f03783
Changes
1
Hide whitespace changes
Inline
Side-by-side
data/schema.postgres.sql
0 → 100644
View file @
80225762
--
-- Table FAQ.
--
create
table
faq
(
id
serial
not
null
constraint
faq_pk
primary
key
,
question
text
not
null
,
reponse
text
not
null
,
ordre
smallint
);
create
unique
index
faq_id_uindex
on
faq
(
id
);
--
-- Jeu d'essai.
--
insert
into
faq
(
question
,
reponse
,
ordre
)
values
(
'qu
''
est-ce qu
''
une question ?'
::
text
,
'c
''
est une phrase appelant une réponse.'
::
text
,
10
);
/*
--
-- création si besoin de la catégorie de privilège 'faq'.
--
insert into categorie_privilege(code, libelle, ordre) values
('faq', 'faq', 10);
--
-- privilège 'modification'.
--
insert into privilege(categorie_id, code, libelle, ordre)
select cp.id, 'modification', 'modification de la faq', 10
from categorie_privilege cp where cp.code = 'faq';
*/
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment