Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherpad-lite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
runcon
etherpad-lite
Commits
6bcd2886
Commit
6bcd2886
authored
13 years ago
by
Peter 'Pita' Martischka
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some problems with the database convertion
parent
932ad0ee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/convert.js
+37
-19
37 additions, 19 deletions
bin/convert.js
bin/convertSettings.json.template
+1
-1
1 addition, 1 deletion
bin/convertSettings.json.template
with
38 additions
and
20 deletions
bin/convert.js
+
37
−
19
View file @
6bcd2886
...
@@ -52,7 +52,7 @@ async.series([
...
@@ -52,7 +52,7 @@ async.series([
{
{
log
(
"
get all padIds out of the database...
"
);
log
(
"
get all padIds out of the database...
"
);
etherpadDB
.
query
(
"
SELECT ID FROM PAD_META
LIMIT
"
,
[],
function
(
err
,
_padIDs
)
etherpadDB
.
query
(
"
SELECT ID FROM PAD_META
"
,
[],
function
(
err
,
_padIDs
)
{
{
padIDs
=
_padIDs
;
padIDs
=
_padIDs
;
callback
(
err
);
callback
(
err
);
...
@@ -153,11 +153,14 @@ function convertPad(padId, callback)
...
@@ -153,11 +153,14 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
//parse the pages
try
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
{
parsePage
(
chatMessages
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
//parse the pages
}
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
parsePage
(
chatMessages
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
}
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
@@ -172,11 +175,14 @@ function convertPad(padId, callback)
...
@@ -172,11 +175,14 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
//parse the pages
try
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
{
parsePage
(
changesets
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
false
);
//parse the pages
}
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
parsePage
(
changesets
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
false
);
}
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
@@ -191,11 +197,14 @@ function convertPad(padId, callback)
...
@@ -191,11 +197,14 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
//parse the pages
try
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
{
parsePage
(
changesetsMeta
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
//parse the pages
}
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
parsePage
(
changesetsMeta
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
}
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
@@ -210,7 +219,10 @@ function convertPad(padId, callback)
...
@@ -210,7 +219,10 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
apool
=
JSON
.
parse
(
results
[
0
].
JSON
).
x
;
try
{
apool
=
JSON
.
parse
(
results
[
0
].
JSON
).
x
;
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
@@ -225,11 +237,14 @@ function convertPad(padId, callback)
...
@@ -225,11 +237,14 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
//parse the pages
try
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
{
parsePage
(
authors
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
//parse the pages
}
for
(
var
i
=
0
,
length
=
results
.
length
;
i
<
length
;
i
++
)
{
parsePage
(
authors
,
results
[
i
].
PAGESTART
,
results
[
i
].
OFFSETS
,
results
[
i
].
DATA
,
true
);
}
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
@@ -244,7 +259,10 @@ function convertPad(padId, callback)
...
@@ -244,7 +259,10 @@ function convertPad(padId, callback)
{
{
if
(
!
err
)
if
(
!
err
)
{
{
padmeta
=
JSON
.
parse
(
results
[
0
].
JSON
).
x
;
try
{
padmeta
=
JSON
.
parse
(
results
[
0
].
JSON
).
x
;
}
catch
(
e
)
{
err
=
e
}
}
}
callback
(
err
);
callback
(
err
);
...
...
This diff is collapsed.
Click to expand it.
bin/convertSettings.json.template
+
1
−
1
View file @
6bcd2886
{
{
"etherpad
-db
":
"etherpad
DB
":
{
{
"host": "localhost",
"host": "localhost",
"port": 3306,
"port": 3306,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment