Closed effjot closed 7 months ago
I have implemented a licence attribution field in my repo (437c7d4).
There’s a little problem with the tests though. I don’t know Postgresql vey well yet. I would prefer to add the new field license_attribution
after the license
field; that’s what I did in 20_TABLE_SEQUENCE_DEFAULT.sql
for the fresh database. However, the alter table
in upgrade_to_1.1.0.sql
adds the new field at the end of the table, which makes the test fail. Should I add the new field to the end in fresh databases (20_TABLE_SEQUENCE_DEFAULT.sql
), too, as this is mainly a cosmetic concern, or is there a way to add the new field to an existing table after license
?
Can you make a PR ?
I don't think we care about the order in the DB. You can still change the order in the drag&drop form ? (fields can be ordered there) Would it be OK ?
I’ll prepare a PR tomorrow. Yes, the DB order is not that important. It just would look nicer when working with the raw data ;-)
Ordering fields in a database doesn't seem well supported : https://stackoverflow.com/questions/285733/how-do-i-alter-the-position-of-a-column-in-a-postgresql-database-table/21028894
When exporting data, you can choose explicitly your columns, or make a view. The database is not designed for that.
The ordering “problem” also affects views (v_dataset
), but again it’s only a cosmetic issue. ;-)
I think we can close this after PR #85 has been merged.
Enhancment proposal: It would be great to have an additional field for license numbers, ODC-BY and German Data Licence attributions etc.