Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
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
Changes
2
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)
...
@@ -19,33 +19,37 @@ import Gargantext.API.Admin.EnvTypes (DevEnv)
import
Gargantext.API.Dev
(
withDevEnv
,
runCmdDev
)
import
Gargantext.API.Dev
(
withDevEnv
,
runCmdDev
)
import
Gargantext.API.Prelude
(
GargError
)
import
Gargantext.API.Prelude
(
GargError
)
import
Gargantext.API.Node
()
-- instances only
import
Gargantext.API.Node
()
-- instances only
import
Gargantext.API.Ngrams.Tools
(
getRepo
)
import
Gargantext.Database.Prelude
(
Cmd
''
,
)
import
Gargantext.Database.Prelude
(
Cmd
''
,
)
import
Gargantext.Core.NodeStory
import
Gargantext.Prelude
import
Gargantext.Prelude
import
Gargantext.Prelude.Config
(
GargConfig
(
..
),
readConfig
)
import
System.Environment
(
getArgs
)
import
System.Environment
(
getArgs
)
import
Prelude
(
getLine
)
import
Prelude
(
getLine
)
import
GHC.IO.Exception
(
IOException
)
-- PosTag
import
Gargantext.Database.Action.Flow
(
indexAllDocumentsWithPosTag
)
main
::
IO
()
main
::
IO
()
main
=
do
main
=
do
[
iniPath
]
<-
getArgs
putStrLn
"Manual method (for now):"
putStrLn
"Manual method:"
putStrLn
"Upgrade your schema database with the script:"
putStrLn
"Upgrade your GarganText instance with the script:"
putStrLn
"psql gargandbV5 < ./devops/postgres/upgrade/0.0.2.6.sql"
putStrLn
"Then press enter key to launch upgrade."
putStrLn
"Then press enter key when you are done"
_ok
<-
getLine
_ok
<-
getLine
[
iniPath
]
<-
getArgs
cfg
<-
readConfig
iniPath
let
let
upgrade
::
Cmd''
DevEnv
GargError
()
-- upgrade :: Cmd'' DevEnv GargError ()
upgrade
::
Cmd''
DevEnv
IOException
()
upgrade
=
do
upgrade
=
do
-- This method does not work for now
let
repo_filepath
=
_gc_repofilepath
cfg
-- _ <- createTable_NgramsPostag
repo
<-
getRepo
_
<-
indexAllDocumentsWithPosTag
_
<-
liftBase
$
repoMigration
repo_filepath
repo
pure
()
pure
()
withDevEnv
iniPath
$
\
env
->
do
withDevEnv
iniPath
$
\
env
->
do
_
<-
runCmdDev
env
upgrade
_
<-
runCmdDev
env
upgrade
putStrLn
"Uprade"
putStrLn
"Uprade
done with success
"
pure
()
pure
()
package.yaml
View file @
9a29b3fc
...
@@ -43,12 +43,14 @@ library:
...
@@ -43,12 +43,14 @@ library:
-
Gargantext.API.Node
-
Gargantext.API.Node
-
Gargantext.API.Node.File
-
Gargantext.API.Node.File
-
Gargantext.API.Ngrams
-
Gargantext.API.Ngrams
-
Gargantext.API.Ngrams.Tools
-
Gargantext.API.Ngrams.Types
-
Gargantext.API.Ngrams.Types
-
Gargantext.API.Admin.Settings
-
Gargantext.API.Admin.Settings
-
Gargantext.API.Admin.EnvTypes
-
Gargantext.API.Admin.EnvTypes
-
Gargantext.API.Admin.Types
-
Gargantext.API.Admin.Types
-
Gargantext.API.Prelude
-
Gargantext.API.Prelude
-
Gargantext.Core
-
Gargantext.Core
-
Gargantext.Core.NodeStory
-
Gargantext.Core.Methods.Distances
-
Gargantext.Core.Methods.Distances
-
Gargantext.Core.Types
-
Gargantext.Core.Types
-
Gargantext.Core.Types.Individu
-
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