Thu 13 August 2015

Filed under postgres

Some basic Postgres that I have used

psql Dbname Dbname => \dt -------------------------------> See tables in the DB Dbname => \d+ tablename ---------------------> See columns in specific table Dbname => ALTER TABLE tablename RENAME old_column_name TO new_column_name; ----> Change column name Dbname => \quit -----------------------------> To get back to commandline prompt Dbname => DROP TABLE tablename; ------------> Drop table python makemigrations appname ---> New migration after deleting all migrations.!!Make sure to include the name of the app

Comment © Dee Kras Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More