[OSM-dev] API 0.6 work required
Shaun McDonald
shaun at shaunmcdonald.me.uk
Tue Sep 30 19:48:59 BST 2008
Update below.
On 29 Sep 2008, at 23:30, Shaun McDonald wrote:
>
> On 29 Sep 2008, at 18:48, Martijn van Oosterhout wrote:
>
>> On Mon, Sep 29, 2008 at 6:27 PM, Shaun McDonald
>> <shaun at shaunmcdonald.me.uk> wrote:
>>> One of the problems I see with the migrations is that there is no
>>> linkage between the changesets and the revisions of the nodes,
>>> ways and
>>> relations. Is it simply a case of adding a changeset field to each
>>> of
>>> the following tables: current_nodes, current_relations,
>>> current_ways,
>>> nodes, relations, and ways? Then appropriate belongs_to and has_many
>>> items would be added to the relevant classes.
>>
>> The current user field will get renamed to changeset_id. I thought
>> that particular bit was already done, since it's just a bit of DB
>> migration code.
>
> From
> http://trac.openstreetmap.org/browser/sites/rails_port_branches/api06/db/migrate/020_add_changesets.rb
> It appears it hasn't been done yet.
>
> Thanks for the extra information, I'll get it done in the next
> couple of days.
>
If I understand the problem correctly, it is a bit more than just a
migration change, as you need to update all the models to reflect this
too.
All the (old)node/way/relations now belong to a changeset, and the
changeset has many (old)node/way/relations. There doesn't seem to be a
way to do belongs_to :user, :through => :changeset. This would make
code changes over the models more minimalistic.
The diff of the changes today is available
http://tinyurl.com/3pkkf6 am I on the right track?
All tests are now failing until the fixtures are upgraded to take into
account the changesets.
Finally, I have now setup an automated builder for the tests, which
will test the api06 branch on each commit.
It is available at:
http://cruise.shaunmcdonald.me.uk/
Results should be in within 15 minutes of the commit.
Shaun
> Shaun
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2433 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080930/d5acf674/attachment.bin>
More information about the dev
mailing list