# HG changeset patch # User Sylvain Thénault # Date 1248685053 -7200 # Node ID b1958ebed570ca247b4531b7e97575f60cf87941 # Parent 45248d0ad8a0eaef42fa994e3604bb7af45be609 rewrite .sql / .rel files, drop unnecessary entity types, explicit imports diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/bootstrap_cubes --- a/devtools/test/data/bootstrap_cubes Mon Jul 27 09:40:31 2009 +0200 +++ b/devtools/test/data/bootstrap_cubes Mon Jul 27 10:57:33 2009 +0200 @@ -1,1 +1,1 @@ -person, comment +person diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/devtools/test/data/schema.py Mon Jul 27 10:57:33 2009 +0200 @@ -0,0 +1,20 @@ +""" + +:organization: Logilab +:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. +:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr +:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses +""" +from yams.buildobjs import EntityType, SubjectRelation, String, Int, Date + +from cubes.person.schema import Person + +Person.add_relation(Date(), 'birthday') + +class Bug(EntityType): + title = String(maxsize=64, required=True, fulltextindexed=True) + severity = String(vocabulary=('important', 'normal', 'minor'), default='normal') + cost = Int() + description = String(maxsize=4096, fulltextindexed=True) + identical_to = SubjectRelation('Bug', symetric=True) + diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/Bug.sql --- a/devtools/test/data/schema/Bug.sql Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -title ivarchar(64) not null -state CHOICE('open', 'rejected', 'validation pending', 'resolved') default 'open' -severity CHOICE('important', 'normal', 'minor') default 'normal' -cost integer -description ivarchar(4096) diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/Project.sql --- a/devtools/test/data/schema/Project.sql Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -name ivarchar(64) not null -summary ivarchar(128) -vcsurl varchar(256) -reporturl varchar(256) -description ivarchar(1024) -url varchar(128) diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/Story.sql --- a/devtools/test/data/schema/Story.sql Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -title ivarchar(64) not null -state CHOICE('open', 'rejected', 'validation pending', 'resolved') default 'open' -priority CHOICE('minor', 'normal', 'important') default 'normal' -cost integer -description ivarchar(4096) diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/Version.sql --- a/devtools/test/data/schema/Version.sql Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -num varchar(16) not null -diem date -status CHOICE('planned', 'dev', 'published') default 'planned' diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/custom.py --- a/devtools/test/data/schema/custom.py Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -""" - -:organization: Logilab -:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. -:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr -:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses -""" -Person = import_erschema('Person') -Person.add_relation(Date(), 'birthday') diff -r 45248d0ad8a0 -r b1958ebed570 devtools/test/data/schema/relations.rel --- a/devtools/test/data/schema/relations.rel Mon Jul 27 09:40:31 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -Bug concerns Project inline -Story concerns Project inline - -Bug corrected_in Version inline CONSTRAINT E concerns P, X version_of P -Story done_in Version inline CONSTRAINT E concerns P, X version_of P - -Bug identical_to Bug symetric -Bug identical_to Story symetric -Story identical_to Story symetric - -Story depends_on Story -Story depends_on Bug -Bug depends_on Story -Bug depends_on Bug - -Bug see_also Bug symetric -Bug see_also Story symetric -Bug see_also Project symetric -Story see_also Story symetric -Story see_also Project symetric -Project see_also Project symetric - -Project uses Project - -Version version_of Project inline -Version todo_by CWUser - -Comment about Bug inline -Comment about Story inline -Comment about Comment inline - -CWUser interested_in Project -