Mailing List Archive

Resetting the database (v 2.0.1)
Hi,

I've just started to experiment with Bricolage, and so far, I really
like it. I've been experimenting with a few content management systems
recently, and have found them to be too restrictive for my needs.
Bricolage is impressive.

I've messed around with element types, stories, output channels, and so
on, but as I am still experimenting, I'd like to be able to wipe
everything and start again. I might need to do this a few times. My
goal is to recreate an existing static site in Bricolage, so I'm playing
around with different ways of doing it.

I'm working with Template Toolkit (I've already used it extensively with
Catalyst), so ideally I'd like to start with a blank slate - no element
types, templates, output channels, or workflows. Is there a recommended
method for doing this?

I ran the following TRUNCATE commands in psql, which seemed to do the trick:

TRUNCATE story_instance CASCADE;
TRUNCATE story CASCADE;
TRUNCATE site CASCADE;

...but now I'm experiencing some rather wierd issues with disappearing
element types - don't try this at home! :-)

The installation is running on a VirtualBox image, so if necessary, I
can just revert it to the snapshot that I saved immediately after
installation. However, as mentioned above, I'd still quite like to
remove the default element types, etc.



Regards,

Mike
Re: Resetting the database (v 2.0.1) [ In reply to ]
Hi Mike,

Rather than doing that directly in the database, I'd suggest using the
API to do the deletions. the bric_soap commandline tool is great for
this. The following line will kill all the element types:

bric_soap element_type list_ids | bric_soap element_type delete -

...and you can do the same thing for templates and stories.


The default set of workflows really is the bare minimum. You need at
least one story workflow, one media workflow, and one template workflow.
Trimming down the list of desks in each workflow is probably best done
in the UI.

Similarly, you need at least one site, and one output channel, so no
point deleting the default ones.


Hope this helps,

Bret



On Fri, 2011-05-13 at 17:24 +0100, Mike Raynham wrote:
> Hi,
>
> I've just started to experiment with Bricolage, and so far, I really
> like it. I've been experimenting with a few content management systems
> recently, and have found them to be too restrictive for my needs.
> Bricolage is impressive.
>
> I've messed around with element types, stories, output channels, and so
> on, but as I am still experimenting, I'd like to be able to wipe
> everything and start again. I might need to do this a few times. My
> goal is to recreate an existing static site in Bricolage, so I'm playing
> around with different ways of doing it.
>
> I'm working with Template Toolkit (I've already used it extensively with
> Catalyst), so ideally I'd like to start with a blank slate - no element
> types, templates, output channels, or workflows. Is there a recommended
> method for doing this?
>
> I ran the following TRUNCATE commands in psql, which seemed to do the trick:
>
> TRUNCATE story_instance CASCADE;
> TRUNCATE story CASCADE;
> TRUNCATE site CASCADE;
>
> ...but now I'm experiencing some rather wierd issues with disappearing
> element types - don't try this at home! :-)
>
> The installation is running on a VirtualBox image, so if necessary, I
> can just revert it to the snapshot that I saved immediately after
> installation. However, as mentioned above, I'd still quite like to
> remove the default element types, etc.
>
>
>
> Regards,
>
> Mike
>

--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret@pectopah.com
www.pectopah.com
Re: Resetting the database (v 2.0.1) [ In reply to ]
Hi Bret,

Thanks for the prompt reply. I'd seen the SOAP entries in the docs, but
not really looked at them in any detail. They look very useful. I'll
give it a try later.


Regards,

Mike


On 13/05/11 17:41, Bret Dawson wrote:
> Hi Mike,
>
> Rather than doing that directly in the database, I'd suggest using the
> API to do the deletions. the bric_soap commandline tool is great for
> this. The following line will kill all the element types:
>
> bric_soap element_type list_ids | bric_soap element_type delete -
>
> ...and you can do the same thing for templates and stories.
>
>
> The default set of workflows really is the bare minimum. You need at
> least one story workflow, one media workflow, and one template workflow.
> Trimming down the list of desks in each workflow is probably best done
> in the UI.
>
> Similarly, you need at least one site, and one output channel, so no
> point deleting the default ones.
>
>
> Hope this helps,
>
> Bret
>
>
>
> On Fri, 2011-05-13 at 17:24 +0100, Mike Raynham wrote:
>> Hi,
>>
>> I've just started to experiment with Bricolage, and so far, I really
>> like it. I've been experimenting with a few content management systems
>> recently, and have found them to be too restrictive for my needs.
>> Bricolage is impressive.
>>
>> I've messed around with element types, stories, output channels, and so
>> on, but as I am still experimenting, I'd like to be able to wipe
>> everything and start again. I might need to do this a few times. My
>> goal is to recreate an existing static site in Bricolage, so I'm playing
>> around with different ways of doing it.
>>
>> I'm working with Template Toolkit (I've already used it extensively with
>> Catalyst), so ideally I'd like to start with a blank slate - no element
>> types, templates, output channels, or workflows. Is there a recommended
>> method for doing this?
>>
>> I ran the following TRUNCATE commands in psql, which seemed to do the trick:
>>
>> TRUNCATE story_instance CASCADE;
>> TRUNCATE story CASCADE;
>> TRUNCATE site CASCADE;
>>
>> ...but now I'm experiencing some rather wierd issues with disappearing
>> element types - don't try this at home! :-)
>>
>> The installation is running on a VirtualBox image, so if necessary, I
>> can just revert it to the snapshot that I saved immediately after
>> installation. However, as mentioned above, I'd still quite like to
>> remove the default element types, etc.
>>
>>
>>
>> Regards,
>>
>> Mike
>>
>
Re: Resetting the database (v 2.0.1) [ In reply to ]
On 13/05/11 17:41, Bret Dawson wrote:
> Hi Mike,
>
> Rather than doing that directly in the database, I'd suggest using the
> API to do the deletions. the bric_soap commandline tool is great for
> this. The following line will kill all the element types:
>
> bric_soap element_type list_ids | bric_soap element_type delete -
>
> ...and you can do the same thing for templates and stories.
>
>
> The default set of workflows really is the bare minimum. You need at
> least one story workflow, one media workflow, and one template workflow.
> Trimming down the list of desks in each workflow is probably best done
> in the UI.
>
> Similarly, you need at least one site, and one output channel, so no
> point deleting the default ones.
>
>
> Hope this helps,
>
> Bret

Here's what I did:

export BRICOLAGE_USERNAME=username
export BRICOLAGE_PASSWORD=password

bric_soap element_type list_ids | bric_soap element_type delete -
bric_soap output_channel list_ids | bric_soap output_channel delete -
bric_soap template list_ids | bric_soap template delete -

bric_soap desk list_ids --search name="Copy" | bric_soap desk delete -
bric_soap desk list_ids --search name="Legal" | bric_soap desk delete -

That leaves me with a clean setup upon which I can build. The Copy and
Legal desks still appeared in the Web GUI after deleting them. Editing
and saving a workflow (without making any changes) solved that problem.

Thanks again for your help.


Regards,

Mike