MariaDB [comm_september2023]> SHOW FULL COLUMNS FROM uploads;
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id | bigint(20) | NULL | NO | PRI | NULL | | select,insert,update,references | |
| uploader | varchar(255) | latin1_bin | YES | | NULL | | select,insert,update,references | |
| container | bigint(20) | NULL | YES | MUL | NULL | | select,insert,update,references | |
| type | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| filename | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| mime | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| content | longblob | NULL | NO | | NULL | | select,insert,update,references | |
| secret | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| creation_time | bigint(20) | NULL | NO | | NULL | | select,insert,update,references | |
| extra | longtext | utf8mb4_bin | YES | | NULL | | select,insert,update,references | |
| thread | bigint(20) | NULL | YES | MUL | NULL | | select,insert,update,references | |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
11 rows in set (0.003 sec)
MariaDB [comm_september2023]> SHOW FULL COLUMNS FROM uploads;
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id | bigint(20) | NULL | NO | PRI | NULL | | select,insert,update,references | |
| uploader | varchar(255) | latin1_bin | YES | | NULL | | select,insert,update,references | |
| container | bigint(20) | NULL | YES | MUL | NULL | | select,insert,update,references | |
| type | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| filename | varchar(255) | utf8mb4_bin | NO | | NULL | | select,insert,update,references | |
| mime | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| content | longblob | NULL | NO | | NULL | | select,insert,update,references | |
| secret | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| creation_time | bigint(20) | NULL | NO | | NULL | | select,insert,update,references | |
| extra | longtext | utf8mb4_bin | YES | | NULL | | select,insert,update,references | |
| thread | bigint(20) | NULL | YES | MUL | NULL | | select,insert,update,references | |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
11 rows in set (0.004 sec)
query to create table from setup-db.js
MariaDB [comm_september2023]> CREATE TABLE uploads2 (
-> id bigint(20) NOT NULL,
-> thread bigint(20) DEFAULT NULL,
-> uploader varchar(255) CHARSET latin1 COLLATE latin1_bin NOT NULL,
-> container bigint(20) DEFAULT NULL,
-> type varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci NOT NULL,
-> filename varchar(255) NOT NULL,
-> mime varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci NOT NULL,
-> content longblob NOT NULL,
-> secret varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci NOT NULL,
-> creation_time bigint(20) NOT NULL,
-> extra json DEFAULT NULL
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Query OK, 0 rows affected (0.030 sec)
query to look at created table (compare to "after migration" above)
MariaDB [comm_september2023]> SHOW FULL COLUMNS FROM uploads2;
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id | bigint(20) | NULL | NO | | NULL | | select,insert,update,references | |
| thread | bigint(20) | NULL | YES | | NULL | | select,insert,update,references | |
| uploader | varchar(255) | latin1_bin | NO | | NULL | | select,insert,update,references | |
| container | bigint(20) | NULL | YES | | NULL | | select,insert,update,references | |
| type | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| filename | varchar(255) | utf8mb4_bin | NO | | NULL | | select,insert,update,references | |
| mime | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| content | longblob | NULL | NO | | NULL | | select,insert,update,references | |
| secret | varchar(255) | latin1_swedish_ci | NO | | NULL | | select,insert,update,references | |
| creation_time | bigint(20) | NULL | NO | | NULL | | select,insert,update,references | |
| extra | longtext | utf8mb4_bin | YES | | NULL | | select,insert,update,references | |
+---------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+