Re: changing db schema's after application deployment



Dave Brown wrote:

Anyway I started to think about what happens in the future when hopefully I have a user base and make changes to my application which require changes to the database. Say for example I add a new column to one of my tables, well I suppose in the startup code I can check for the existance of that particular column and create it if it isnt there already. Which led me to think rather than ship a already existing database, why dont I have a routine at startup that checks for the existance of a database, and creates it and then checks for the existance of each table/column.


Is this a common approach ?

It's usual to provide some kind of utility to create/upgrade databases.

After the first version, you might find it useful to have the code that creates the database create the version 1 schema and then upgrade that. You will have to go back and write the upgrade code anyway, so you might as well not duplicate the effort.

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
.



Relevant Pages

  • Re: NT/W2K users as Access Users
    ... key down when they open the database. ... bypassing all your startup code. ... > that gets the network user ID and compares it to the Access user ID. ... If another network user tries to start the app with someone else's ...
    (microsoft.public.access.security)
  • Re: NT/W2K users as Access Users
    ... I can't find anything in help about a DDL ... > key down when they open the database. ... bypassing all your startup code. ... If another network user tries to start the app with someone ...
    (microsoft.public.access.security)
  • Re: Compact and repair problems
    ... got an error that states "Microsoft Access has encountered a problem and ... key down while opening the copy so the startup code doesn't execute. ... module and compile the code if it's not compiled. ... import all objects from this copy into the new database. ...
    (microsoft.public.access.gettingstarted)
  • Re: Selecting records for print
    ... > problem on a datasheet refresh, or a resize of a form. ... I don't recall hearing of this as a problem before. ... You could create this database (in the current user's Temp ... >> folder), and create the table in the database, in your startup code, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Knowing when the Start up settings was bypassed with the shift key
    ... But you could find out if the startup code runs or not. ... startup code create a new record, edit a current record, or set a global ... variable whenever the database opens. ... bypassed by using the shift key, the database was opened programmatically, ...
    (microsoft.public.access.security)