Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
5ad2ec85
Commit
5ad2ec85
authored
Mar 02, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
Changes on versioning catalog table
See merge request
nexedi/erp5!1367
parents
4b516fe8
a25aed72
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
13 deletions
+41
-13
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testDms.py
...s/TestTemplateItem/portal_components/test.erp5.testDms.py
+9
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_versioning_list.sql
...l_catalog/erp5_mysql_innodb/z_catalog_versioning_list.sql
+3
-2
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_versioning_list.xml
...l_catalog/erp5_mysql_innodb/z_catalog_versioning_list.xml
+10
-8
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_versioning.sql
.../portal_catalog/erp5_mysql_innodb/z_create_versioning.sql
+2
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_versioning.xml
.../portal_catalog/erp5_mysql_innodb/z_create_versioning.xml
+17
-1
No files found.
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testDms.py
View file @
5ad2ec85
...
...
@@ -572,6 +572,14 @@ class TestDocument(TestDocumentMixin):
self
.
assertSameSet
([],
sqlresult_to_document_list
(
document1
.
getImplicitPredecessorValueList
()))
def
test_catalog_search_by_size
(
self
):
doc
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'Spreadsheet'
,
file
=
makeFileUpload
(
'import_data_list.ods'
))
self
.
tic
()
self
.
assertEqual
(
[
x
.
getObject
()
for
x
in
self
.
portal
.
portal_catalog
(
size
=
doc
.
getSize
())],
[
doc
])
def
testOOoDocument_get_size
(
self
):
# test get_size on OOoDocument
doc
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
'Spreadsheet'
)
...
...
@@ -3032,4 +3040,4 @@ def test_suite():
return
suite
# vim: syntax=python shiftwidth=2
# vim: syntax=python shiftwidth=2
\ No newline at end of file
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_versioning_list.sql
View file @
5ad2ec85
REPLACE
INTO
versioning
(
`uid`
,
`version`
,
`language`
,
`revision`
,
`subject_set_uid`
,
`effective_date`
,
(
`uid`
,
`version`
,
`
size`
,
`
language`
,
`revision`
,
`subject_set_uid`
,
`effective_date`
,
`expiration_date`
,
`creation_date_index`
,
`frequency_index`
)
VALUES
<
dtml
-
in
prefix
=
"loop"
expr
=
"_.range(_.len(uid))"
>
(
<
dtml
-
sqlvar
expr
=
"uid[loop_item]"
type
=
"int"
>
,
<
dtml
-
sqlvar
expr
=
"uid[loop_item]"
type
=
"int"
>
,
<
dtml
-
sqlvar
expr
=
"getVersion[loop_item]"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"getSize[loop_item]"
type
=
"int"
optional
>
,
<
dtml
-
sqlvar
expr
=
"getLanguage[loop_item]"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"getRevision[loop_item]"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"subject_set_uid[loop_item]"
type
=
"int"
optional
>
,
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_versioning_list.xml
View file @
5ad2ec85
...
...
@@ -14,22 +14,20 @@
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\n
getLanguage\n
getVersion\n
getSize\n
getRevision\n
subject_set_uid\n
getEffectiveDate\n
getExpirationDate\n
getCreationDateIndex\n
getFrequencyIndex\n
</string>
</value>
getFrequencyIndex
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
...
...
@@ -37,11 +35,15 @@ getFrequencyIndex\n
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
...
...
@@ -87,7 +89,7 @@ getFrequencyIndex\n
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
z_catalog_versioning_list
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_versioning.sql
View file @
5ad2ec85
CREATE
TABLE
`versioning`
(
`uid`
BIGINT
UNSIGNED
NOT
NULL
,
`version`
varchar
(
10
)
default
''
,
`version`
varchar
(
255
)
default
''
,
`size`
BIGINT
SIGNED
,
`language`
varchar
(
5
)
default
''
,
`revision`
varchar
(
10
)
default
''
,
`subject_set_uid`
INT
UNSIGNED
,
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_versioning.xml
View file @
5ad2ec85
...
...
@@ -12,10 +12,26 @@
<tuple/>
</value>
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
...
...
@@ -30,7 +46,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
z_create_versioning
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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