Downgrade 4.0 database to 3.0 database

Turning a 4.0 database into a 3.0 database means deleting a few columns from the 4.0 database and changing the version stamp.

Delete these columns:

Add these columns:

Delete these tables completely:

Change the ixVersion value in the Version table to the number 328.

Note: Attachments uploaded to a 4.0 database will not be available once the database is downgraded to 3.0.  There is no workaround for this.