<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3177#discussion_r613610427">db/migrate/20201004105659_create_doorkeeper_tables.rb</a>:</p>
<pre style='color:#555'>> +
+ create_table :oauth_access_grants do |t|
+ t.references :resource_owner, :null => false, :type => :bigint
+ t.references :application, :null => false
+ t.string :token, :null => false
+ t.integer :expires_in, :null => false
+ t.text :redirect_uri, :null => false
+ t.datetime :created_at, :null => false
+ t.datetime :revoked_at
+ t.string :scopes, :null => false, :default => ""
+ t.column :code_challenge, :string, :null => true
+ t.column :code_challenge_method, :string, :null => true
+ end
+
+ add_index :oauth_access_grants, :token, :unique => true
+ add_foreign_key :oauth_access_grants, :users, :column => :resource_owner_id, :validate => false
</pre>
<p>Well it's a new table so there's nothing to validate - new records will still have to obey the constraint.</p>
<p>It's true that the database won't assume it's valid for all records but I'm not sure when that would matter.</p>
<p>I'm not really sure where that came from... It doesn't look like it came from doorkeeper's generator so I guess I added it for some reason, likely to shut safety_assured up because it didn't realise that the table was empty so complained that validation would be blocking.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3177#discussion_r613610427">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJEQO3SAB32FHCC7GDTIYFAFANCNFSM4234LSSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLOLLHJ7YGA4YCD74NDTIYFAFA5CNFSM4234LSS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEXVEKBI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3177#discussion_r613610427",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3177#discussion_r613610427",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>