[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clone database with no financial transactions
- Subject: Re: clone database with no financial transactions
- From: Chris Travers <..hidden..>
- Date: Mon, 27 Jun 2011 23:03:13 -0700
On Mon, Jun 27, 2011 at 11:02 PM, Chris Travers <..hidden..> wrote:
> On Mon, Jun 27, 2011 at 10:02 PM, david <..hidden..> wrote:
>> I want to clone a database but with no financial transactions. I want to
>> keep customers, vendors, parts, services, accounts, etc. but all
>> accounts with zero balance.
>>
>> Is this possible?
>>
> Yes. In psql:
>
> CREATE DATABASE my_newdb WITH TEMPLATE my_old_db;
>
Note this will clone everything.
If you want to get rid of the transactions, you will need to delete
everything in the acc_trans, ar, ap, and gl tables.