<div dir="ltr">Hi everybody, just in this moment I found the same error trying to delete some layers.<div><br></div><div>Looking around I found that the file migration is missing for the Upload app, it only has the</div><div>24_initial.py, but this file includes the creation of the new fields, the right way have to be two files,</div><div>the initial24.py and the 24_to_26.py as the other apps.</div><div><br></div><div>So as we run initial--fake, the tables are not created, the solution for me was to delete the old</div><div>upload and upload_file tables (I don't know why are empty), delete the fake migration in the</div><div>django_migrations table and run the migrate comand for upload, and thats it, the tables were</div><div>created.</div><div><br></div><div>Hope this helps somebody. Greetings from Mexico.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-18 13:39 GMT-05:00 Simone Dalmasso <span dir="ltr"><<a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks all for the answers and feedbacks, we should investigate why "migrate" did not add those columns. It should be its job.<div><br></div><div>Best</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2017-10-18 20:10 GMT+02:00 Eric Goddard <span dir="ltr"><<a href="mailto:egoddard1010@gmail.com" target="_blank">egoddard1010@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Annalisa, I ended up going that route too. I added those<br>
columns and removed the not null constraint on last_login on<br>
people_profile.<br>
<br>
Eric<br>
<br>
On Wed, Oct 18, 2017 at 2:49 AM, Annalisa Schiavon<br>
<<a href="mailto:annalisa.schiavon@gmail.com" target="_blank">annalisa.schiavon@gmail.com</a>> wrote:<br>
> Dear Eric,<br>
> on 3 July I found a similar issue: upload_upload table hasn't 4 attribute:<br>
> mosaic_time_regex,<br>
> mosaic_time_value, mosaic_elev_regex and mosaic_elev_value.<br>
> I added those columns and solved my problem.<br>
><br>
> Regards,<br>
> Annalisa<br>
><br>
> 2017-10-16 16:24 GMT+02:00 Eric Goddard <<a href="mailto:egoddard1010@gmail.com" target="_blank">egoddard1010@gmail.com</a>>:<br>
>><br>
>> Hi all,<br>
>><br>
>> We're trying to upgrade from GeoNode 2.4 to 2.6. I have a new VM with<br>
>> Geonode 2.6 installed on Ubuntu 16.04 from the PPA. I dumped the<br>
>> postgres data from our 2.4 server and created new DBs on the Geonode<br>
>> 2.6 instance and updated settings.py to point to the geonode 2.4<br>
>> geonode and geonode_data DBs.<br>
>><br>
>> Following the suggestion in this thread<br>
>><br>
>> (<a href="http://osgeo-org.1560.x6.nabble.com/Help-for-migrate-data-from-2-4-to-2-6-td5323208.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabb<wbr>le.com/Help-for-migrate-data-<wbr>from-2-4-to-2-6-td5323208.html</a><wbr>),<br>
>> I ran geonode migrate --fake-initial and everything appears to have<br>
>> worked, however if I try to create a new account from the geonode<br>
>> registration page, or delete an existing account from the admin panel<br>
>> I get some errors.<br>
>><br>
>> Trying to create a new account results in the following error:<br>
>> IntegrityError: null value in column "last_login" violates not-null<br>
>> constraint<br>
>><br>
>> Trying to delete an account results in the following error:<br>
>> ProgrammingError: column upload_upload.mosaic_time_rege<wbr>x does not exist<br>
>><br>
>> It looks like the migration didn't run correctly. If anyone has advice<br>
>> on how fix/work a round this issue it would be greatly appreciated!<br>
>> We'll be reloading the data anyway so our main concern is just<br>
>> migrating the accounts and groups.<br>
>><br>
>> If it helps, here is the comparison of the geonode 2.4 and 2.6 schemas<br>
>> for the upload_upload table. The mosaic* columns are missing from the<br>
>> 2.4 database that was migrated:<br>
>><br>
>> geonode 2.4 database (after running migrate):<br>
>> geonode24=# \d upload_upload<br>
>> Table "public.upload_upload"<br>
>> Column | Type | Modifiers<br>
>><br>
>> ------------+-----------------<wbr>---------+--------------------<wbr>------------------------------<wbr>----------<br>
>> id | integer | not null default<br>
>> nextval('upload_upload_id_seq'<wbr>::regclass)<br>
>> import_id | bigint |<br>
>> user_id | integer |<br>
>> state | character varying(16) | not null<br>
>> date | timestamp with time zone | not null<br>
>> layer_id | integer |<br>
>> upload_dir | character varying(100) |<br>
>> name | character varying(64) |<br>
>> complete | boolean | not null<br>
>> session | text |<br>
>> metadata | text |<br>
>> Indexes:<br>
>> "upload_upload_pkey" PRIMARY KEY, btree (id)<br>
>> "upload_upload_layer_id" btree (layer_id)<br>
>> "upload_upload_user_id" btree (user_id)<br>
>> Foreign-key constraints:<br>
>> "upload_upload_layer_id_fkey" FOREIGN KEY (layer_id) REFERENCES<br>
>> layers_layer(resourcebase_ptr_<wbr>id) DEFERRABLE INITIALLY DEFERRED<br>
>> "upload_upload_user_id_fkey" FOREIGN KEY (user_id) REFERENCES<br>
>> people_profile(id) DEFERRABLE INITIALLY DEFERRED<br>
>> Referenced by:<br>
>> TABLE "upload_uploadfile" CONSTRAINT<br>
>> "upload_uploadfile_upload_id_f<wbr>key" FOREIGN KEY (upload_id) REFERENCES<br>
>> upload_upload(id) DEFERRABLE INITIALLY DEFERRED<br>
>><br>
>> Geonode 2.6 database (from initial install):<br>
>> geonode=# \d upload_upload<br>
>> Table "public.upload_upload"<br>
>> Column | Type |<br>
>> Modifiers<br>
>><br>
>> -------------------+----------<wbr>----------------+-------------<wbr>------------------------------<wbr>-----------------<br>
>> id | integer | not null default<br>
>> nextval('upload_upload_id_seq'<wbr>::regclass)<br>
>> import_id | bigint |<br>
>> state | character varying(16) | not null<br>
>> date | timestamp with time zone | not null<br>
>> upload_dir | character varying(100) |<br>
>> name | character varying(64) |<br>
>> complete | boolean | not null<br>
>> session | text |<br>
>> metadata | text |<br>
>> mosaic_time_regex | character varying(128) |<br>
>> mosaic_time_value | character varying(128) |<br>
>> mosaic_elev_regex | character varying(128) |<br>
>> mosaic_elev_value | character varying(128) |<br>
>> layer_id | integer |<br>
>> user_id | integer |<br>
>> Indexes:<br>
>> "upload_upload_pkey" PRIMARY KEY, btree (id)<br>
>> "upload_upload_7a39a38c" btree (layer_id)<br>
>> "upload_upload_e8701ad4" btree (user_id)<br>
>> Foreign-key constraints:<br>
>> "u_layer_id_6346de911330a880_<wbr>fk_layers_layer_resourcebase_p<wbr>tr_id"<br>
>> FOREIGN KEY (layer_id) REFERENCES layers_layer(resourcebase_ptr_<wbr>id)<br>
>> DEFERRABLE INITIALLY DEFERRED<br>
>> "upload_upload_user_id_7fad11<wbr>6c8478bf31_fk_people_profile_<wbr>id"<br>
>> FOREIGN KEY (user_id) REFERENCES people_profile(id) DEFERRABLE<br>
>> INITIALLY DEFERRED<br>
>> Referenced by:<br>
>> TABLE "upload_uploadfile" CONSTRAINT<br>
>> "upload_uploadfil_upload_id_21<wbr>ef448d17dd4b6b_fk_upload_uploa<wbr>d_id"<br>
>> FOREIGN KEY (upload_id) REFERENCES upload_upload(id) DEFERRABLE<br>
>> INITIALLY DEFERRED<br>
>><br>
>><br>
>> Thanks!<br>
>><br>
>> Eric<br>
>> ______________________________<wbr>_________________<br>
>> geonode-users mailing list<br>
>> <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/geonode-users</a><br>
><br>
><br>
______________________________<wbr>_________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/geonode-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-5701106273287797711gmail_signature" data-smartmail="gmail_signature">Simone </div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br></div>