better description of the problem:
DAL updates to change/add columns don't work when Postgres has data in it
If I create duplicate empty version of Postgres schema, then collumns get
created/changed correctly
If I try on production copy of schema that has data, it doesn't take
does this
the whole problem, which I spent weeks on, was that the web2py.exe was or
became corrupted in a subtle way.
I downloaded a fresh (same version) and everything worked perfectly.
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
Is your app compiled? If so, changes you make to the .py files will have no
effect unless you remove the compiled files.
Anthony
On Monday, February 8, 2016 at 2:58:25 AM UTC-5, Alex Glaros wrote:
>
> okay, just tested on PythonAnywherre and it works perfectly as Anthony and
> the manual
Postgres changes created by DAL work correctly on site #1 local machine.
They only do not work on site #2 when I copy the app from site #1.
Could the problem be how I transfer the development to site #2?
On site #1 I do a "pack all" in web2py, and a "pg_dump" on Postgres.
Then at site #2, I
do a pack all, install the app, run pg_restore, don't run any code. set
fake_migrate_all=True, hit appadmin, set fake_migrate_all=False. voilà.
On Monday, February 8, 2016 at 7:11:06 PM UTC+1, Alex Glaros wrote:
>
> no, I did not compile.
>
> Postgres changes created by DAL work correctly on
Hey Alex,
could it be that you define the table twice in the code?
Marin
On Mon, Feb 8, 2016 at 6:56 AM, Alex Glaros wrote:
> If that model is consistent with the current state of the database, run
> the code once with fake_migrate so web2py will update the migration
>
okay, just tested on PythonAnywherre and it works perfectly as Anthony and
the manual describe.
it is something related to my specific setup at home
will test on different desktop tomorrow
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
We need to see some code.
On Sunday, February 7, 2016 at 1:37:51 PM UTC-5, Alex Glaros wrote:
>
> Problem trying to add a column when Postgres is the database
>
> When I add the column in DAL with either migrate=True, fake_migrate, or
> fake_migrate_all, nothing happens on Postgres side. I just
For db connection I've used every combination possbile below
(migrate_enabled=True, fake_migrate, etc.) including every combination of
deleting or leaving table w2p databases folder, dropping the table from
Postgres, dropping from web2py, etc.
db =
We need to see the model code.
On Sunday, February 7, 2016 at 10:46:17 PM UTC-5, Alex Glaros wrote:
>
> For db connection I've used every combination possbile below
> (migrate_enabled=True, fake_migrate, etc.) including every combination of
> deleting or leaving table w2p databases folder,
same results regardless of table or field. Example below where new field
is added at bottom:
BEFORE
db.define_table('Reputation',
Field('reputation_code', 'string'),
Field('reputation_description', 'string'))
AFTER
db.define_table('Reputation',
Field('reputation_code', 'string'),
Specify the model as you want it. If that model is consistent with the
current state of the database, run the code once with fake_migrate so
web2py will update the migration metadata. If that model is not consistent
with the database, then delete the relevant *.table file and run the code
with
If that model is consistent with the current state of the database, run the
code once with fake_migrate so web2py will update the migration metadata.
Well,, I forced it to be consistent with model by creating the field on
Postgres side. When ran fake_migrate, I received
column
13 matches
Mail list logo