ALTER TABLE documents ALTER COLUMN doc_page_count SET DEFAULT 0;
ALTER TABLE documents MODIFY COLUMN cmc_reference varchar(255) null;
ALTER TABLE documents MODIFY COLUMN pdf_flename varchar(255) null;
ALTER TABLE documents MODIFY COLUMN pdf_created_at datetime null;
ALTER TABLE documents MODIFY COLUMN pdf_created_by_user_id int(11) null;
ALTER TABLE documents MODIFY COLUMN email_sent_at datetime null;
ALTER TABLE documents MODIFY COLUMN email_sent_by_user_id int(11) null;
ALTER TABLE documents MODIFY COLUMN revision int(11) null;


ALTER TABLE purchase_orders MODIFY COLUMN issue_date date null;
ALTER TABLE purchase_orders MODIFY COLUMN date_arrived date null;
ALTER TABLE purchase_orders MODIFY COLUMN dispatch_date date null;
ALTER TABLE purchase_orders MODIFY COLUMN principle_id int(11) null;
ALTER TABLE purchase_orders MODIFY COLUMN principle_reference varchar(255) null;
ALTER TABLE purchase_orders MODIFY COLUMN ordered_from text null;
ALTER TABLE purchase_orders MODIFY COLUMN description text null;
ALTER TABLE purchase_orders MODIFY COLUMN dispatch_by varchar(255) null;
ALTER TABLE purchase_orders MODIFY COLUMN deliver_to text null;
ALTER TABLE purchase_orders MODIFY COLUMN shipping_instructions text null;
ALTER TABLE purchase_orders MODIFY COLUMN jobs_text varchar(512) null;

ALTER TABLE jobs MODIFY COLUMN comments TEXT null;
ALTER TABLE jobs MODIFY COLUMN date_scheduled_ex_works date null;
ALTER TABLE jobs MODIFY COLUMN date_order_sent_to_customer date null;
ALTER TABLE jobs MODIFY COLUMN sale_category int(2)  null;

ALTER TABLE jobs ALTER COLUMN all_sent SET DEFAULT 0;
ALTER TABLE jobs ALTER COLUMN all_paid SET DEFAULT 0;


ALTER TABLE order_acknowledgements MODIFY COLUMN ship_via varchar(255) null;
ALTER TABLE order_acknowledgements MODIFY COLUMN fob varchar(255) null;
ALTER TABLE order_acknowledgements MODIFY COLUMN estimated_deliery varchar(255) null;

-- write a script to make everythin nullable..



| issue_date            | date         | NO   |     | NULL    |                |
| dispatch_date         | date         | NO   |     | NULL    |                |
| date_arrived          | date         | NO   |     | NULL    |                |
| title                 | varchar(255) | NO   |     | NULL    |                |
| principle_id          | int(11)      | NO   |     | NULL    |                |
| principle_reference   | varchar(255) | NO   |     | NULL    |                |
| document_id           | int(11)      | NO   |     | NULL    |                |
| currency_id           | int(11)      | YES  |     | NULL    |                |
| ordered_from          | text         | NO   |     | NULL    |                |
| description           | text         | NO   |     | NULL    |                |
| dispatch_by           | varchar(255) | NO   |     | NULL    |                |
| deliver_to            | text         | NO   |     | NULL    |                |
| shipping_instructions | text         | NO   |     | NULL    |                |
| jobs_text             | varchar(512) | NO   |     | NULL    |                |
+-----------------------+--------------+------+-----+---------+----------------+

