|
1 | 1 | # frozen_string_literal: true |
2 | 2 |
|
| 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 | +# |
3 | 44 | RSpec.describe Template do |
4 | 45 | let(:account) { create(:account) } |
5 | 46 | let(:user) { create(:user, account:) } |
|
0 commit comments