Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
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
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Przemyslaw Kaminski
  • haskell-gargantext
  • Repository

Switch branch/tag
  • haskell-gargantext
  • devops
  • postgres
  • create
Find file
BlameHistoryPermalink
  • Alexandre Delanoë's avatar
    [DATABASE] Postgres upgrade + schema + triggers (use gargantext-init to configure it). · 6890ae68
    Alexandre Delanoë authored 5 years ago
    6890ae68
create 365 Bytes
EditWeb IDE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/bash

# sudo su postgres

# postgresql://$USER:$PW@localhost/$DB

PW="C8kdcUrAQy66U"
DB="gargandbV5"
USER="gargantua"

psql -c "CREATE USER \"${USER}\""
psql -c "ALTER USER \"${USER}\" with PASSWORD '${PW}'"

psql -c "DROP DATABASE IF EXISTS \"${DB}\""
createdb "${DB}"
psql "${DB}" < schema.sql

psql -c "ALTER DATABASE \"${DB}\" OWNER to \"${USER}\""




Replace create

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.