zipperer / migrate_database_with_michael

0 stars 0 forks source link

Add data to table in postgres via SQL #22

Closed zipperer closed 7 months ago

zipperer commented 7 months ago

Follow steps from postgres_script.txt

== add data to table via SQL ==

psql> INSERT INTO my_table (name) VALUES ('alex');
psql> SELECT * FROM my_table;
psql> ALTER TABLE my_table ADD COLUMN phone_number VARCHAR UNIQUE;
psql> UDPATE my_table SET phone_number = 2 WHERE name = 'alex';
psql> SELECT * FROM my_table;
psql> ALTER TABLE my_table ALTER COLUMN phone_number SET NOT NULL;
psql> \d my_table
psql> \q
zipperer commented 7 months ago

We did this during #2 .