You should look inside the .table files. They are just pickles.
On Oct 17, 5:33 pm, billf <[EMAIL PROTECTED]> wrote:
> Annet
>
> I'm guessing here (maybe someone else can confirm this): if when you
> install the new application you copied the .table files from the mock
> application databases folder to the new application then I think
> web2py would be happy to migrate changes. However, if this is true
> then I'm not sure what would happen if you then went back to the mock
> application as the .table there would be out of step with the
> database. But as you are uninstalling the mock application that's
> would not be a problem.
>
> Bill
>
> On Oct 17, 5:47 pm, annet <[EMAIL PROTECTED]> wrote:
>
> > I ran into the same problem. I had a mock application in which I
> > created the model. Later I uninstalled the mock application and
> > created a new application in which I use the same model. The problem
> > is that when I want to alter something (let's say the length of a
> > field from 20 to 30) in the model in the newly created application I
> > get the following error:
>
> > ProgrammingError: relation "text" already exists.
>
> > In Massimo's reply I read:
>
> > "Hence it can do migrations if and only if web2py created the tables
> > in
> > the first place... You cannot do a migration on a table that was pre-
> > existing
> > (migrate=False)"
>
> > Does this imply that I have to get my model correct, right from the
> > start, because I cannot alter it at a later stage, that would be very
> > awkward. Would not having set migrate=False on the tables have
> > prevented me from this problem. Is there a way to reverse this action.
> > I mean dropping a database with all its data, creating a new one,
> > migrating the model and inserting the data again. Is a rather time
> > consuming way to alter a table definition.
>
> > I hope there is another solution to this problem.
>
> > Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---