mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 04:03:43 +08:00
9f6b7889a8
This fixes all known issues when connecting to discourse over IPv6. This table has no primary key, so the migration is done with update_all, for each ip address in the views table. Since this table can potentially grow quite large, this process might take a long time. I don't know any way around this, though. This migration uses a SQL command to populate the new field from the old one, so as not to rely on the View model class, which should keep the migration from failing if that class is modified in the future.
14 lines
308 B
Ruby
14 lines
308 B
Ruby
require 'spec_helper'
|
|
|
|
describe View do
|
|
|
|
it { should belong_to :parent }
|
|
it { should belong_to :user }
|
|
it { should validate_presence_of :parent_type }
|
|
it { should validate_presence_of :parent_id }
|
|
it { should validate_presence_of :ip_address }
|
|
it { should validate_presence_of :viewed_at }
|
|
|
|
|
|
end
|