Commit da327994 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[-feature] Extend size of data_session field in database.

Currently, estimated max. size of content is approx. 2000 octets, besides alt_emails attribute. Thus 2000 o is required and more is recommended.
- MySQL & SQLite: "text" type may still be used.
- ODBC: varchar allows 8000 o, sometimes 4000 o: Use "varchar(4000)".
- Oracle: Oracle 7 allows 2000 o and 8 and later allow 4000 o: Use "varchar2(2000)".
- PostgreSQL: Change "varchar()" to a compatible type "text".
parent 05d80b59
......@@ -1273,7 +1273,11 @@ Keyword with length up to 20 o.
=item text
Text with length up to 500 o.
Text with length up to 2000 o at minimum.
4000 o or longer is recommended.
Note:
On Sympa 6.2.36 or later, required size was 500 o.
=item longtext
......
......@@ -53,7 +53,7 @@ sub translate_type {
# ODBC
$type =~ s/^double/real/g;
$type =~ s/^enum.*/varchar(20)/g;
$type =~ s/^text.*/varchar(500)/g;
$type =~ s/^text.*/varchar(4000)/g; # varchar(500) on <= 6.2.36
$type =~ s/^longtext.*/text/g;
$type =~ s/^datetime/timestamp/g;
$type =~ s/^mediumblob/longvarbinary/g;
......
......@@ -535,7 +535,9 @@ sub translate_type {
$type =~ s/^tinyint.*/number/g;
$type =~ s/^double/number/g;
$type =~ s/^enum.*/varchar2(20)/g;
$type =~ s/^text.*/varchar2(500)/g;
# varchar2(500) on <= 6.2.36
# FIXME: Oracle 8 and later support varchar2 up to 4000 o.
$type =~ s/^text.*/varchar2(2000)/g;
$type =~ s/^longtext.*/long/g;
$type =~ s/^datetime.*/date/g;
$type =~ s/^mediumblob/blob/g;
......
......@@ -639,7 +639,7 @@ sub translate_type {
$type =~ s/^tinyint\(.*\)/int2/g;
$type =~ s/^bigint.*/int8/g;
$type =~ s/^double/float8/g;
$type =~ s/^text.*/varchar(500)/g;
$type =~ s/^text.*/text/g; # varchar(500) on <= 6.2.36
$type =~ s/^longtext.*/text/g;
$type =~ s/^datetime.*/timestamptz/g;
$type =~ s/^enum.*/varchar(15)/g;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment