discourse/db
Dan Johnson 2e478d8537 TopicLinkClick: convert 'ip' (bigint) -> 'ip_address' (inet)
When accessed over IPv6, the ip address of the user is a 128-bit number,
too big for PostgreSQL's bigint data type. Since PostgresSQL has the
built-in inet type, which handles both IPv4 and IPv6 addresses, we
should use that instead. Where this is done elsewhere in the codebase,
the column is called ip_address, so we should follow that convention as
well.

This migration uses a SQL command to populate the new field from the old
one, so as not to rely on the TopicLinkClick model class, which should
keep the migration from failing if that class is modified in the future.
2013-06-25 19:41:19 -04:00
..
fixtures added 2 new flag types: notify user and notify moderators 2013-04-12 17:55:45 +10:00
migrate TopicLinkClick: convert 'ip' (bigint) -> 'ip_address' (inet) 2013-06-25 19:41:19 -04:00
seeds.rb Initial release of Discourse 2013-02-05 14:16:51 -05:00