Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
9a29b3fc
Commit
9a29b3fc
authored
Aug 26, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BIN] upgrade script
parent
516ca84e
Pipeline
#1737
passed with stage
in 34 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
Main.hs
bin/gargantext-upgrade/Main.hs
+17
-13
package.yaml
package.yaml
+2
-0
No files found.
bin/gargantext-upgrade/Main.hs
View file @
9a29b3fc
...
...
@@ -19,33 +19,37 @@ import Gargantext.API.Admin.EnvTypes (DevEnv)
import
Gargantext.API.Dev
(
withDevEnv
,
runCmdDev
)
import
Gargantext.API.Prelude
(
GargError
)
import
Gargantext.API.Node
()
-- instances only
import
Gargantext.API.Ngrams.Tools
(
getRepo
)
import
Gargantext.Database.Prelude
(
Cmd
''
,
)
import
Gargantext.Core.NodeStory
import
Gargantext.Prelude
import
Gargantext.Prelude.Config
(
GargConfig
(
..
),
readConfig
)
import
System.Environment
(
getArgs
)
import
Prelude
(
getLine
)
-- PosTag
import
Gargantext.Database.Action.Flow
(
indexAllDocumentsWithPosTag
)
import
GHC.IO.Exception
(
IOException
)
main
::
IO
()
main
=
do
[
iniPath
]
<-
getArgs
putStrLn
"Manual method (for now):"
putStrLn
"Upgrade your schema database with the script:"
putStrLn
"psql gargandbV5 < ./devops/postgres/upgrade/0.0.2.6.sql"
putStrLn
"Then press enter key when you are done"
putStrLn
"Manual method:"
putStrLn
"Upgrade your GarganText instance with the script:"
putStrLn
"Then press enter key to launch upgrade."
_ok
<-
getLine
[
iniPath
]
<-
getArgs
cfg
<-
readConfig
iniPath
let
upgrade
::
Cmd''
DevEnv
GargError
()
-- upgrade :: Cmd'' DevEnv GargError ()
upgrade
::
Cmd''
DevEnv
IOException
()
upgrade
=
do
-- This method does not work for now
-- _ <- createTable_NgramsPostag
_
<-
indexAllDocumentsWithPosTag
let
repo_filepath
=
_gc_repofilepath
cfg
repo
<-
getRepo
_
<-
liftBase
$
repoMigration
repo_filepath
repo
pure
()
withDevEnv
iniPath
$
\
env
->
do
_
<-
runCmdDev
env
upgrade
putStrLn
"Uprade"
putStrLn
"Uprade
done with success
"
pure
()
package.yaml
View file @
9a29b3fc
...
...
@@ -43,12 +43,14 @@ library:
-
Gargantext.API.Node
-
Gargantext.API.Node.File
-
Gargantext.API.Ngrams
-
Gargantext.API.Ngrams.Tools
-
Gargantext.API.Ngrams.Types
-
Gargantext.API.Admin.Settings
-
Gargantext.API.Admin.EnvTypes
-
Gargantext.API.Admin.Types
-
Gargantext.API.Prelude
-
Gargantext.Core
-
Gargantext.Core.NodeStory
-
Gargantext.Core.Methods.Distances
-
Gargantext.Core.Types
-
Gargantext.Core.Types.Individu
...
...
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