Skip to content

Commit 9fc121d

Browse files
committed
auto generate template schema table in spec model file
* not sure why this wasn't auto generated previously, but it's here now
1 parent e53e22f commit 9fc121d

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

spec/models/template_spec.rb

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: templates
6+
#
7+
# id :bigint not null, primary key
8+
# archived_at :datetime
9+
# external_data_fields :text
10+
# fields :text not null
11+
# name :string not null
12+
# preferences :text not null
13+
# schema :text not null
14+
# shared_link :boolean default(FALSE), not null
15+
# slug :string not null
16+
# source :text not null
17+
# submitters :text not null
18+
# created_at :datetime not null
19+
# updated_at :datetime not null
20+
# account_id :integer
21+
# author_id :integer not null
22+
# external_id :string
23+
# folder_id :integer not null
24+
# partnership_id :bigint
25+
#
26+
# Indexes
27+
#
28+
# index_templates_on_account_id (account_id)
29+
# index_templates_on_account_id_and_folder_id_and_id (account_id,folder_id,id) WHERE (archived_at IS NULL)
30+
# index_templates_on_account_id_and_id_archived (account_id,id) WHERE (archived_at IS NOT NULL)
31+
# index_templates_on_author_id (author_id)
32+
# index_templates_on_external_id (external_id)
33+
# index_templates_on_folder_id (folder_id)
34+
# index_templates_on_partnership_id (partnership_id)
35+
# index_templates_on_slug (slug) UNIQUE
36+
#
37+
# Foreign Keys
38+
#
39+
# fk_rails_... (account_id => accounts.id)
40+
# fk_rails_... (author_id => users.id)
41+
# fk_rails_... (folder_id => template_folders.id)
42+
# fk_rails_... (partnership_id => partnerships.id)
43+
#
344
RSpec.describe Template do
445
let(:account) { create(:account) }
546
let(:user) { create(:user, account:) }

0 commit comments

Comments
 (0)