Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
08fd1060
Commit
08fd1060
authored
Jul 16, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: locale db field length
parent
ab55f33d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
2.0.0-beta.1.js
server/db/migrations/2.0.0-beta.1.js
+7
-5
No files found.
server/db/migrations/2.0.0-beta.1.js
View file @
08fd1060
/* global WIKI */
exports
.
up
=
knex
=>
{
const
dbCompat
=
{
charset
:
(
WIKI
.
config
.
db
.
type
===
`mysql`
||
WIKI
.
config
.
db
.
type
===
`mariadb`
)
...
...
@@ -67,7 +69,7 @@ exports.up = knex => {
// LOCALES -----------------------------
.
createTable
(
'locales'
,
table
=>
{
if
(
dbCompat
.
charset
)
{
table
.
charset
(
'utf8mb4'
)
}
table
.
string
(
'code'
,
2
).
notNullable
().
primary
()
table
.
string
(
'code'
,
5
).
notNullable
().
primary
()
table
.
json
(
'strings'
)
table
.
boolean
(
'isRTL'
).
notNullable
().
defaultTo
(
false
)
table
.
string
(
'name'
).
notNullable
()
...
...
@@ -241,26 +243,26 @@ exports.up = knex => {
.
table
(
'pageHistory'
,
table
=>
{
table
.
integer
(
'pageId'
).
unsigned
().
references
(
'id'
).
inTable
(
'pages'
)
table
.
string
(
'editorKey'
).
references
(
'key'
).
inTable
(
'editors'
)
table
.
string
(
'localeCode'
,
2
).
references
(
'code'
).
inTable
(
'locales'
)
table
.
string
(
'localeCode'
,
5
).
references
(
'code'
).
inTable
(
'locales'
)
table
.
integer
(
'authorId'
).
unsigned
().
references
(
'id'
).
inTable
(
'users'
)
})
.
table
(
'pages'
,
table
=>
{
table
.
string
(
'editorKey'
).
references
(
'key'
).
inTable
(
'editors'
)
table
.
string
(
'localeCode'
,
2
).
references
(
'code'
).
inTable
(
'locales'
)
table
.
string
(
'localeCode'
,
5
).
references
(
'code'
).
inTable
(
'locales'
)
table
.
integer
(
'authorId'
).
unsigned
().
references
(
'id'
).
inTable
(
'users'
)
table
.
integer
(
'creatorId'
).
unsigned
().
references
(
'id'
).
inTable
(
'users'
)
})
.
table
(
'pageTree'
,
table
=>
{
table
.
integer
(
'parent'
).
unsigned
().
references
(
'id'
).
inTable
(
'pageTree'
)
table
.
integer
(
'pageId'
).
unsigned
().
references
(
'id'
).
inTable
(
'pages'
)
table
.
string
(
'localeCode'
,
2
).
references
(
'code'
).
inTable
(
'locales'
)
table
.
string
(
'localeCode'
,
5
).
references
(
'code'
).
inTable
(
'locales'
)
})
.
table
(
'userKeys'
,
table
=>
{
table
.
integer
(
'userId'
).
unsigned
().
references
(
'id'
).
inTable
(
'users'
)
})
.
table
(
'users'
,
table
=>
{
table
.
string
(
'providerKey'
).
references
(
'key'
).
inTable
(
'authentication'
).
notNullable
().
defaultTo
(
'local'
)
table
.
string
(
'localeCode'
,
2
).
references
(
'code'
).
inTable
(
'locales'
).
notNullable
().
defaultTo
(
'en'
)
table
.
string
(
'localeCode'
,
5
).
references
(
'code'
).
inTable
(
'locales'
).
notNullable
().
defaultTo
(
'en'
)
table
.
string
(
'defaultEditor'
).
references
(
'key'
).
inTable
(
'editors'
).
notNullable
().
defaultTo
(
'markdown'
)
table
.
unique
([
'providerKey'
,
'email'
])
...
...
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