Re: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Richard Quadling
On 15 July 2010 13:29, Bob McConnell  wrote:
> From: Pete Ford
>
>> On 15/07/10 09:14, Ashley Sheridan wrote:
>>> ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin
>>> produces when you make the changes in there.
>>>
>>
>> Yeah, scripting "ALTER TABLE" commands ... :)
>
> We maintain two files for every schema, site_schema.pgsql and
> site_delta.pgsql. Every time we modify the schema, we add the change
> commands to the delta file. We also have markers in it for each build
> number, so the update scripts can determine which changes need to be run
> when a site is updated.
>
> We use a similar technique on other systems that use Oracle or Sybase
> ASA on the back end, but those are stored as a shell database and sets
> of patch files for each build.
>
> Bob McConnell

I use a tool called SQL Compare and SQL Data Compare - by a company
called RedGate. These allow me and others to work on our in-house DBs
and when we are ready to roll out the release, create a changeset of
all the differences between the last release and this one.

It only works on MS SQL servers, but there are others [1]

Regards,

Richard Quadling.

[1] 
http://stackoverflow.com/questions/1265962/is-there-an-equivalent-of-redgate-sql-compare-for-mysql-databases

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Bob McConnell
From: Pete Ford

> On 15/07/10 09:14, Ashley Sheridan wrote:
>> ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin
>> produces when you make the changes in there.
>>
>
> Yeah, scripting "ALTER TABLE" commands ... :)

We maintain two files for every schema, site_schema.pgsql and
site_delta.pgsql. Every time we modify the schema, we add the change
commands to the delta file. We also have markers in it for each build
number, so the update scripts can determine which changes need to be run
when a site is updated.

We use a similar technique on other systems that use Oracle or Sybase
ASA on the back end, but those are stored as a shell database and sets
of patch files for each build.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Pete Ford

On 15/07/10 09:14, Ashley Sheridan wrote:

ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin
produces when you make the changes in there.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Yeah, scripting "ALTER TABLE" commands ... :)

--
Peter Ford, Developer phone: 01580 89 fax: 01580 893399
Justcroft International Ltd.  www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent   TN12 0AH   United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php