Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2-widgets2-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hrzg
yii2-widgets2-module
Commits
1c24b885
Commit
1c24b885
authored
Nov 18, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added migration to convert table to utf8; fixed table name with prefix
parent
5e396169
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
m161118_101348_alter_charset_to_utf8.php
src/migrations/m161118_101348_alter_charset_to_utf8.php
+21
-0
Widget.php
src/models/crud/base/Widget.php
+1
-1
WidgetTemplate.php
src/models/crud/base/WidgetTemplate.php
+1
-1
No files found.
src/migrations/m161118_101348_alter_charset_to_utf8.php
0 → 100644
View file @
1c24b885
<?php
use
yii\db\Migration
;
class
m161118_101348_alter_charset_to_utf8
extends
Migration
{
public
function
up
()
{
Yii
::
$app
->
db
->
createCommand
(
"ALTER TABLE
{
{%hrzg_widget_content}
}
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ;"
)
->
execute
();
Yii
::
$app
->
db
->
createCommand
(
"ALTER TABLE
{
{%hrzg_widget_template}
}
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ;"
)
->
execute
();
}
public
function
down
()
{
echo
"m160721_101347_alter_charset_to_utf8 cannot be reverted.
\n
"
;
return
false
;
}
}
src/models/crud/base/Widget.php
View file @
1c24b885
...
...
@@ -34,7 +34,7 @@ abstract class Widget extends \yii\db\ActiveRecord
*/
public
static
function
tableName
()
{
return
'
app_hrzg_widget_content
'
;
return
'
{{%hrzg_widget_content}}
'
;
}
/**
...
...
src/models/crud/base/WidgetTemplate.php
View file @
1c24b885
...
...
@@ -21,7 +21,7 @@ abstract class WidgetTemplate extends \yii\db\ActiveRecord
*/
public
static
function
tableName
()
{
return
'
app_hrzg_widget_template
'
;
return
'
{{%hrzg_widget_template}}
'
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment