On Wed, Jul 16, 2008 at 2:35 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 15, 2008 at 9:22 PM, Jamey Cribbs <[EMAIL PROTECTED]> wrote:
>> I've created a Staging extension.  You create a "staging" instance of
>> the radiant app that can either reside on the same server as the
>> production instance or another server.  The extension gives you a
>> Staging tab, where you can click a button to migrate the staging db to
>> the production db.  The extension also disables the admin functions on
>> the production instance.
>>
>> So, the idea is that you make all your changes on the staging instance
>> and once you like the way staging looks, you "stage" the db to
>> production.  There is also the ability to easily revert to a previous
>> stage by simply clicking on a previous stage.
>>
>> There are some caveats.  In order to make sure that all the foreign
>> keys between tables don't get out of whack, I am doing bulk exports
>> and and imports, completely outside of ActiveRecord.  Because my
>> client uses MySQL for their radiant app, I have coded it using the
>> mysqldump and mysql source commands.  So, right now, the extension
>> only works for MySQL databases.
>>
>> My client just started using this extension this week.  So far so
>> good.  I have started discussions with them about letting me
>> open-source the extension, and so far, their response has been
>> positive.
>>
>> There are a few technical issues I need to clean up before I could
>> release the extension, but I hope to get these resolved and get
>> permission from them to release it within the next two weeks.
>>
>> This is definitely not the ultimate answer for the whole
>> preview/versioning thing needed in radiant.  Its what I came up with
>> to meet a specific client request in a minimum amount of time.  If
>> this sounds like something others could use/improve/build-on then I
>> would love to get it open sourced.
>
> Interesting approach.
>
> A potential issue with that (at least for me) is that if I'm using
> extensions that need to store data, the data that's in the production
> database would be overwritten with the data from the staging db,
> especially if the entire database is dropped and recreated.  I could
> get around that by just dropping and copying certain tables over, I
> suppose.
>
> Joe
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>

The extension already handles that use case.  In the config file for
the extension, you can specify which tables, including extension
tables, that you want to have staged to production.  Then when you do
a staging, only the tables you specified actually get exported from
staging and imported into production.

Likewise, you can also specify which admin tabs you want to be
accessible from production.  So, lets say you write an extension that
logs stuff in a table on the production database and lets you view the
log from an admin tab.  It wouldn't make sense to only allow admin
access to that tab on staging, cause the only data is in the
production table of that extension.  You can specify that that
extension is accessible from the production admin screen, even though
all of the other admin tabs are disabled on production.

Jamey
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to