Ver código fonte

:pencil: add postgresql document

Jeremy Zheng 4 anos atrás
pai
commit
72067145c4

+ 3 - 15
README.md

@@ -14,24 +14,12 @@ application up and running.
     bundle install
     ```
 
-- Database creation & initialization
-    ![create database](documents/create-db.png)
+- Rails commands
   
     ```bash
-    # migrate the database to latest
-    rake db:migrate    
-    # rolls the schema back to the previous version
-    rake db:rollback
-    # loads the seed data
-    rake db:seed
-    ```
-
-- Create a model & migration
-  
-    ```bash
-    # plain model
+    # generate rails model
     rails generate model Item --no-fixture --no-test-framework
-    # plain migration
+    # generate rails migration
     rails generate migration AddHiToUsers
     ```
 

+ 3 - 3
DAY-7.md → documents/day-7.md

@@ -2,13 +2,13 @@
 
 ## DAY 1
 
-- [Start container](docker/)
+- [Start container](../docker/)
 - [Dia Diagram Editor](http://dia-installer.de/index.html.en)
 
 ## DAY 2
 
 - Install dependencies
-- Database creation & initialization
+- [Database creation & initialization](postgresql/)
 - Create a model & migration
-- [Table definition demo](db/migrate/20210804025823_devise_create_users.rb)
+- [Table definition demo](../db/migrate/20210804025823_devise_create_users.rb)
 - Please **DO NOT** commit `db/schema.rb`

+ 21 - 0
documents/postgresql/README.md

@@ -0,0 +1,21 @@
+# PostgreSql
+
+- Create database
+![create database](create-db.png)
+
+- Rails command
+
+    ```bash
+    # migrate the database to latest
+    rake db:migrate    
+    # rolls the schema back to the previous version
+    rake db:rollback
+    # loads the seed data
+    rake db:seed
+    ```
+
+- Show database
+  
+    ![show](show.png)
+
+- [Free universal database tool and SQL client](https://dbeaver.io/download/)

+ 0 - 0
documents/create-db.png → documents/postgresql/create-db.png


BIN
documents/postgresql/show.png