Skip to content

Commit

Permalink
Shrink the length of some DB columns to 191 characters for compatibil…
Browse files Browse the repository at this point in the history
…ity with old MySQL versions.
  • Loading branch information
parpalak committed May 3, 2024
1 parent 6394d66 commit 2fb9382
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test_mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- 'mariadb-11.1'
- 'mariadb-11.2'
- 'mariadb-11.3'
- 'mariadb-11.4'
- '8.0'
- '8.2'
- '8.3'
Expand Down Expand Up @@ -63,4 +64,4 @@ jobs:

- name: Output logs
if: failure()
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt && /home/runner/work/s2/s2/_tests/_output/
2 changes: 1 addition & 1 deletion .github/workflows/test_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:

- name: Output logs
if: failure()
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt && /home/runner/work/s2/s2/_tests/_output/
2 changes: 1 addition & 1 deletion .github/workflows/test_sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:

- name: Output logs
if: failure()
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt
run: cat _cache/test/*.log && cat _tests/_output/email/*.txt && /home/runner/work/s2/s2/_tests/_output/
4 changes: 2 additions & 2 deletions _admin/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function s2_output_tag_form ($tag, $modify_time)
<?php ($hook = s2_hook('fn_output_tag_form_pre_name')) ? eval($hook) : null; ?>
<tr>
<td class="label"><?php echo $lang_admin['Tag']; ?></td>
<td><input type="text" name="tag[name]" size="50" maxlength="255" value="<?php echo s2_htmlencode($tag['name']); ?>" /></td>
<td><input type="text" name="tag[name]" size="50" maxlength="191" value="<?php echo s2_htmlencode($tag['name']); ?>" /></td>
</tr>
<?php ($hook = s2_hook('fn_output_tag_form_pre_time')) ? eval($hook) : null; ?>
<tr>
Expand All @@ -169,7 +169,7 @@ function s2_output_tag_form ($tag, $modify_time)
<?php ($hook = s2_hook('fn_output_tag_form_pre_url')) ? eval($hook) : null; ?>
<?php echo $lang_admin['URL part']; ?>
<br />
<input type="text" name="tag[url]" size="18" maxlength="255" value="<?php echo $tag['url']; ?>" />
<input type="text" name="tag[url]" size="18" maxlength="191" value="<?php echo $tag['url']; ?>" />
<br />
<?php ($hook = s2_hook('fn_output_tag_form_pre_replace_tag')) ? eval($hook) : null; ?>
<?php echo $lang_admin['Replace tag']; ?>
Expand Down
10 changes: 5 additions & 5 deletions _include/src/Model/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function createTables(): void
$schema = array(
'FIELDS' => array(
'name' => array(
'datatype' => 'VARCHAR(255)',
'datatype' => 'VARCHAR(191)',
'allow_null' => false,
'default' => '\'\''
),
Expand Down Expand Up @@ -270,7 +270,7 @@ public function createTables(): void
'allow_null' => false
),
'name' => array(
'datatype' => 'VARCHAR(255)',
'datatype' => 'VARCHAR(191)',
'allow_null' => false,
'default' => '\'\''
),
Expand All @@ -284,7 +284,7 @@ public function createTables(): void
'default' => '0'
),
'url' => array(
'datatype' => 'VARCHAR(255)',
'datatype' => 'VARCHAR(191)',
'allow_null' => false,
'default' => '\'\''
),
Expand Down Expand Up @@ -344,7 +344,7 @@ public function createTables(): void
'default' => '0'
),
'login' => array(
'datatype' => 'VARCHAR(200)',
'datatype' => 'VARCHAR(191)',
'allow_null' => true
),
'ip' => array(
Expand Down Expand Up @@ -379,7 +379,7 @@ public function createTables(): void
'allow_null' => false
),
'login' => array(
'datatype' => 'VARCHAR(200)',
'datatype' => 'VARCHAR(191)',
'allow_null' => false,
'default' => '\'\''
),
Expand Down

0 comments on commit 2fb9382

Please sign in to comment.