Subject | Re: How to update table structure with SQL? |
---|---|
Author | neighbour.kerry |
Post date | 2009-06-24T01:29:23Z |
--- In firebird-support@yahoogroups.com, "Jarrod Hollingworth" <jarrod@...> wrote:
But I am listening - I like to do things better. And others in this forum have said similar things, so you might have a point.
The only thing I do not cater for (in the automated script) is data changes. If that ever occurs, then I can send out a one-of script.
One other consideration. I am updating tables all day long at the moment. I make changes to my reference database. Then I run my update program to propagate those changes to my working databases. They are the ones I connect to with Delphi, and do my program development with. I never work on the reference database. If I used your system, I would be stuffing around all day long. My system takes me 30 seconds.
When I finally hand this version to my customers, there will be hundreds of changes. I do not care what they have been - I simply run my update program on the final day, and include the generated script file with the install program of the new version. I care not one whit what their version is - and I have no idea anyway.
Ah - if there is an error - sure - that will be a problem. I might have to cater for that (do a backup first, or something). But I doubt it - I never alter data, so it should never be a problem.
I am thinking on it. Again...thanks.
>Well, ANY work is by definition more work than none at all. Which is what my current system is. No work at all (well, click a button).
> I don't think that you do understand. It isn't much work. It is a much better way to handle DB versioning.
>
But I am listening - I like to do things better. And others in this forum have said similar things, so you might have a point.
> But that's the point. That is not the best approach to database versioning. As your database matures your script will be more increasingly complex to maintain.Nope. My script is auto-generated from the reference database. No work at all - press one button. And it is always the same - whether it is a mature database, or on day one. The script is the same in every case. I just take a snapshot of the reference database as it is at that moment.
The only thing I do not cater for (in the automated script) is data changes. If that ever occurs, then I can send out a one-of script.
One other consideration. I am updating tables all day long at the moment. I make changes to my reference database. Then I run my update program to propagate those changes to my working databases. They are the ones I connect to with Delphi, and do my program development with. I never work on the reference database. If I used your system, I would be stuffing around all day long. My system takes me 30 seconds.
When I finally hand this version to my customers, there will be hundreds of changes. I do not care what they have been - I simply run my update program on the final day, and include the generated script file with the install program of the new version. I care not one whit what their version is - and I have no idea anyway.
>Sure - it is more complex to develop - I had to write a Delphi program to do it. And it IS fairly complex, although not at all hard to read - it is simple DDL after all. But there is no need to understand it - humans never get to read it.
> The difference in the two approaches are that, in my opinion, your script is more complex to develop and more difficult to understand, makes it more difficult to recover from if there is an error.
Ah - if there is an error - sure - that will be a problem. I might have to cater for that (do a backup first, or something). But I doubt it - I never alter data, so it should never be a problem.
>Yes - your comments have been extremely useful. It has given me great food for thought. My current system (with DBISAM) has been working flawlessly (like yours) for about 4 years. Not a problem yet. Firebird is a different kettle of fish though - not as tolerant nor as flexible as DBISAM, so I might have to do things a bit differently.
> I hope this has helped. I've have stressed my point of view in my posts as I honestly think that in the long run you'll get into more difficulty going down your path.
I am thinking on it. Again...thanks.