Commit 3c9079ae authored by Pawel G's avatar Pawel G

Issue #2620654 by falsovsky: Altered {simplesitemap} language_code field to hold longer strings.

parent 15ab1131
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
* Module install functions creating a database table. * Module install functions creating a database table.
*/ */
use Drupal\Core\Database\Database;
/** /**
* Implements hook_schema(). * Implements hook_schema().
*/ */
...@@ -16,7 +18,7 @@ function simplesitemap_schema() { ...@@ -16,7 +18,7 @@ function simplesitemap_schema() {
'description' => 'Language code of the sitemap used as unique identifier.', 'description' => 'Language code of the sitemap used as unique identifier.',
'type' => 'varchar', 'type' => 'varchar',
'not null' => TRUE, 'not null' => TRUE,
'length' => 2, 'length' => 12,
), ),
'sitemap_string' => array( 'sitemap_string' => array(
'description' => 'XML sitemap string.', 'description' => 'XML sitemap string.',
...@@ -29,3 +31,13 @@ function simplesitemap_schema() { ...@@ -29,3 +31,13 @@ function simplesitemap_schema() {
); );
return $schema; return $schema;
} }
/**
* Altering the {simplesitemap} language_code table field to hold longer strings.
*/
function simplesitemap_update_8101() {
db_change_field('simplesitemap', 'language_code', 'language_code', array(
'type' => 'varchar',
'not null' => TRUE,
'length' => 12,));
}
Markdown is supported
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