DDL-Skripts for ccm-simplesurvey are now created automatically

git-svn-id: https://svn.libreccm.org/ccm/trunk@2626 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-04-25 15:55:08 +00:00
parent a73152cd05
commit 2be3e5597a
16 changed files with 50 additions and 326 deletions

View File

@ -1,20 +1,25 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-simplesurvey" name="ccm-simplesurvey"
prettyName="Simple Survey" prettyName="Simple Survey"
version="6.6.1" version="6.6.1"
release="1" release="1"
webapp="ROOT"> webapp="ROOT">
<ccm:dependencies> <ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/> <ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
</ccm:dependencies> </ccm:dependencies>
<ccm:contacts> <ccm:directories>
<ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/> <ccm:directory name="pdl"/>
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/> <ccm:directory name="sql"/>
</ccm:contacts> <ccm:directory name="src"/>
<ccm:description> </ccm:directories>
The Red Hat Web Application Framework is a platform for writing <ccm:contacts>
database-backed web applications in Java. <ccm:contact uri="http://www.redhat.com/software/rhea" type="website"/>
</ccm:description> <ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
</ccm:contacts>
<ccm:description>
The Red Hat Web Application Framework is a platform for writing
database-backed web applications in Java.
</ccm:description>
</ccm:application> </ccm:application>

View File

@ -1,27 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: comment-ss_answers.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
comment on table ss_answers is '
The table stores values entered by the user for a certain question
(with a unique form widget) during a certain survey response. We might choose
to user columns for different datatypes later on.
';
comment on column ss_answers.label_id is '
This is the PersistentLabel of the question to which this is the answer.
';

View File

@ -1,23 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: comment-ss_polls.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
comment on table ss_polls is '
A poll is a special kind of survey. It is unclear if polls will have
additional attributes over Surveys.
';

View File

@ -1,23 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: comment-ss_responses.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
comment on table ss_responses is '
Responses by users to surveys are stored in this table. A user can respond several
times to a survey.
';

View File

@ -1,27 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: comment-ss_surveys.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
comment on table ss_surveys is '
Every entry in this table represents a Simple Survey. It is yet unclear which
attributes we need for the surveys but they would be stored in this table.
';
comment on column ss_surveys.form_id is '
Every Survey is associated with one persistent form. Currently only one persistent
form can be associated.
';

View File

@ -1,20 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: sequence-ss_answers_seq.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create sequence ss_answers_seq start with 1;

View File

@ -1,41 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: table-ss_answers.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create table ss_answers (
answer_id integer
constraint ss_answers_pk
primary key,
response_id integer
constraint ss_answers_rid_fk
references ss_responses (response_id)
on delete cascade,
-- constraint ss_answers_rid_nn
-- not null,
label_id integer
constraint ss_answers_lid_fk
references bebop_components (component_id),
-- constraint ss_answers_lid_nn
-- not null,
widget_id integer
constraint ss_answers_wid_fk
references bebop_widgets (widget_id),
-- constraint ss_answers_wid_nn
-- not null,
value varchar(4000)
);

View File

@ -1,24 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: table-ss_correct_answers.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create table ss_correct_answers (
label_id integer not null references bebop_components,
widget_id integer not null references bebop_components,
value varchar(4000)
);

View File

@ -1,26 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: table-ss_polls.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create table ss_polls (
poll_id integer
constraint ss_polls_pk
primary key
constraint ss_polls_id_fk
references ss_surveys (survey_id)
);

View File

@ -1,39 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: table-ss_responses.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create table ss_responses (
response_id integer
constraint ss_responses_pk
primary key,
survey_id integer
constraint ss_responses_sid_fk
references ss_surveys (survey_id)
on delete cascade
constraint ss_responses_sid_nn
not null,
user_id integer
constraint ss_responses_uid_fk
references users (user_id)
constraint ss_responses_uid_nn
not null,
entry_date date
constraint ss_responses_ed_nn
not null,
score integer
);

View File

@ -1,40 +0,0 @@
--
-- Copyright (C) 2002-2004 Red Hat Inc. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: table-ss_surveys.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $
create table ss_surveys (
survey_id integer
constraint ss_surveys_pk
primary key
constraint ss_surveys_id_fk
references acs_objects (object_id),
package_id integer
constraint ss_surveys_pid_fk
references apm_packages (package_id)
constraint ss_surveys_pid_nn
not null,
form_id integer
constraint ss_surveys_fid_fk
references bebop_form_sections (form_section_id)
constraint ss_surveys_fid_nn
not null,
start_date date,
end_date date,
responses_public_p integer default (1) not null,
quiz_type varchar(50) default 'knowledge_test' not null check (quiz_type in ('knowledge_test','personal_assessment'))
);

View File

@ -18,14 +18,14 @@
-- $Id: oracle-se-create.sql 287 2005-02-22 00:29:02Z sskracic $ -- $Id: oracle-se-create.sql 287 2005-02-22 00:29:02Z sskracic $
-- $DateTime: 2004/08/17 23:26:27 $ -- $DateTime: 2004/08/17 23:26:27 $
@ ddl/oracle-se/create.sql @ ddl/oracle-se/create.sql
@ default/table-ss_surveys.sql --@ default/table-ss_surveys.sql
@ default/comment-ss_surveys.sql --@ default/comment-ss_surveys.sql
@ default/table-ss_responses.sql --@ default/table-ss_responses.sql
@ default/comment-ss_responses.sql --@ default/comment-ss_responses.sql
@ default/table-ss_answers.sql --@ default/table-ss_answers.sql
@ default/sequence-ss_answers_seq.sql --@ default/sequence-ss_answers_seq.sql
@ default/comment-ss_answers.sql --@ default/comment-ss_answers.sql
@ default/table-ss_polls.sql --@ default/table-ss_polls.sql
@ default/comment-ss_polls.sql --@ default/comment-ss_polls.sql
@ default/table-ss_correct_answers.sql --@ default/table-ss_correct_answers.sql
@ ddl/oracle-se/deferred.sql @ ddl/oracle-se/deferred.sql

View File

@ -19,14 +19,15 @@
-- $DateTime: 2004/08/17 23:26:27 $ -- $DateTime: 2004/08/17 23:26:27 $
begin; begin;
\i ddl/postgres/create.sql \i ddl/postgres/create.sql
\i default/table-ss_surveys.sql
\i default/comment-ss_surveys.sql
\i default/table-ss_responses.sql
\i default/comment-ss_responses.sql
\i default/table-ss_answers.sql
\i postgres/sequence-ss_answers_seq.sql
\i default/comment-ss_answers.sql
\i default/table-ss_polls.sql
\i default/comment-ss_polls.sql
\i ddl/postgres/deferred.sql \i ddl/postgres/deferred.sql
--\i default/table-ss_surveys.sql
--\i default/comment-ss_surveys.sql
--\i default/table-ss_responses.sql
--\i default/comment-ss_responses.sql
--\i default/table-ss_answers.sql
--\i postgres/sequence-ss_answers_seq.sql
--\i default/comment-ss_answers.sql
--\i default/table-ss_polls.sql
--\i default/comment-ss_polls.sql
--\i ddl/postgres/deferred.sql
end; end;

View File

@ -10,6 +10,14 @@
<!-- <!--
<table name=""/> <table name=""/>
--> -->
<table name="ss_answers"/>
<table name="ss_polls"/>
<table name="ss_responses"/>
<table name="ss_simplesurvey"/>
<table name="ss_surveys"/>
<initializer class="com.arsdigita.simplesurvey.Initializer"/> <initializer class="com.arsdigita.simplesurvey.Initializer"/>
</provides> </provides>
<scripts> <scripts>