generated from admin/template
17 lines
516 B
Plaintext
17 lines
516 B
Plaintext
-- docker run -d --name my-postgres -e POSTGRES_PASSWORD=zivari -e POSTGRES_INITDB_ARGS="--auth-host=md5" -p 5432:5432 postgres:latest
|
|
|
|
-- docker exec -it my-postgres psql -U postgres
|
|
|
|
CREATE DATABASE dev_db;
|
|
\c dev_db
|
|
|
|
CREATE TABLE users (
|
|
id SERIAL PRIMARY KEY,
|
|
name VARCHAR(100) NOT NULL
|
|
);
|
|
|
|
INSERT INTO users (name) VALUES ('Alice'), ('Bob');
|
|
INSERT INTO users (name) VALUES ('Charlie');
|
|
SELECT * FROM users ORDER BY id;
|
|
|
|
-- Host: localhost, Port: 5432, Database: dev_db, User: postgres, Password: zivari |