Browse Source

Script to create database

Jovian (Netbook) 6 years ago
parent
commit
5c91993bdd
2 changed files with 6 additions and 4 deletions
  1. 5 4
      README.md
  2. 1 0
      SQL/create_db.sql

+ 5 - 4
README.md

@@ -6,10 +6,11 @@ A CLI (Command Line Interface) written in python to query a PostgreSQL database.
 Install postgreSQL :
 `sudo apt install postgresql`
 
-Create the database :
-*#*`psql`
-*postgres=#*`create database logistics;`
+Connect with postgres profile :
+`sudo su postgres`
 
+Create the database :
+`psql -f SQL/create_db.sql postgres`
 
 Populate database with tables :
-*#*`psql -d logistics -f SQL/create_tables.sql postgres`
+`psql -d logistics -f SQL/create_tables.sql postgres`

+ 1 - 0
SQL/create_db.sql

@@ -0,0 +1 @@
+CREATE DATABASE logistics;