Skip to content

Commit b6a70cd

Browse files
committed
feat (ProductionDB): changed fields from BLOB to TEXT
1 parent 31ba27b commit b6a70cd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/DIRAC/ProductionSystem/DB/ProductionDB.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def getProductions(
146146
webList = []
147147
resultList = []
148148
for row in res["Value"]:
149-
# HACK: Description should be converted to a text type
149+
# TODO: remove, as Description should have been converted to a text type
150150
row = [item.decode() if isinstance(item, bytes) else item for item in row]
151151
# Prepare the structure for the web
152152
rList = [str(item) if not isinstance(item, six.integer_types) else item for item in row]
@@ -215,7 +215,7 @@ def getProductionStep(self, stepID, connection=False):
215215
if not res["Value"]:
216216
return S_ERROR("ProductionStep %s did not exist" % str(stepID))
217217
row = res["Value"][0]
218-
# HACK: LongDescription and Body should be converted to a text type
218+
# TODO: remove, as Description and body should have been converted to a text type
219219
row = [item.decode() if isinstance(item, bytes) else item for item in row]
220220
return S_OK(row)
221221

src/DIRAC/ProductionSystem/DB/ProductionDB.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DROP TABLE IF EXISTS Productions;
2222
CREATE TABLE Productions(
2323
ProductionID INTEGER NOT NULL AUTO_INCREMENT,
2424
ProductionName VARCHAR(255) NOT NULL,
25-
Description LONGBLOB,
25+
Description LONGTEXT,
2626
CreationDate DATETIME,
2727
LastUpdate DATETIME,
2828
AuthorDN VARCHAR(255) NOT NULL,
@@ -38,8 +38,8 @@ CREATE TABLE ProductionSteps(
3838
StepID INTEGER NOT NULL AUTO_INCREMENT,
3939
Name VARCHAR(255),
4040
Description VARCHAR(255),
41-
LongDescription BLOB,
42-
Body LONGBLOB,
41+
LongDescription TEXT,
42+
Body LONGTEXT,
4343
Type CHAR(32) DEFAULT 'Simulation',
4444
Plugin CHAR(32) DEFAULT 'None',
4545
AgentType CHAR(32) DEFAULT 'Manual',

0 commit comments

Comments
 (0)