diff --git a/ALTER b/ALTER new file mode 100644 index 0000000..af66221 --- /dev/null +++ b/ALTER @@ -0,0 +1,30 @@ +torjehoa_dibblerdummy=> ALTER TABLE products ADD stock integer; + + Table "torjehoa_dibblerdummy.products" + Column | Type | Modifiers +----------+-----------------------+----------- + bar_code | character varying(13) | not null + name | character varying(45) | + price | integer | +Indexes: + "products_pkey" PRIMARY KEY, btree (bar_code) + +torjehoa_dibblerdummy=> ALTER TABLE products ADD stock integer; +ALTER TABLE +torjehoa_dibblerdummy=> UPDATE products SET stock = 0; +UPDATE 102 +torjehoa_dibblerdummy=> ALTER TABLE products ALTER stock SET NOT NULL; +ALTER TABLE +torjehoa_dibblerdummy=> \d products + Table "torjehoa_dibblerdummy.products" + Column | Type | Modifiers +----------+-----------------------+----------- + bar_code | character varying(13) | not null + name | character varying(45) | + price | integer | + stock | integer | not null +Indexes: + "products_pkey" PRIMARY KEY, btree (bar_code) + +torjehoa_dibblerdummy=> + diff --git a/conf.py b/conf.py index ee342ff..e597395 100644 --- a/conf.py +++ b/conf.py @@ -1,4 +1,4 @@ -db_url = 'sqlite:///data' +db_url = 'postgresql://torjehoa_dibblerdummy:1234@postgres/torjehoa_dibblerdummy' quit_allowed = True stop_allowed = False show_tracebacks = True