forked from openstreetmap/openstreetmap-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds OldNote model file for modeling one row of old_notes table. Also, added author association for connecting with users table.
- Loading branch information
1 parent
96657ab
commit 8f390a2
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# == Schema Information | ||
# | ||
# Table name: old_notes | ||
# | ||
# note_id :bigint(8) not null, primary key | ||
# latitude :integer not null | ||
# longitude :integer not null | ||
# tile :bigint(8) not null | ||
# timestamp :datetime not null | ||
# status :enum not null | ||
# description :text default(""), not null | ||
# user_id :bigint(8) | ||
# user_ip :inet | ||
# version :bigint(8) default(1), not null, primary key | ||
# | ||
# Indexes | ||
# | ||
# index_old_notes_on_version (version) | ||
# | ||
# Foreign Keys | ||
# | ||
# old_notes_note_id_fkey (note_id => notes.id) | ||
# old_notes_user_id_fkey (user_id => users.id) | ||
# | ||
|
||
class OldNote < ApplicationRecord | ||
belongs_to :author, :class_name => "User", :foreign_key => "user_id", :optional => true | ||
end |