|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema[7.1].define(version: 2025_02_28_154526) do |
| 13 | +ActiveRecord::Schema[7.1].define(version: 2025_03_05_213225) do |
14 | 14 | # These are extensions that must be enabled in order to support this database |
15 | 15 | enable_extension "pgcrypto" |
16 | 16 | enable_extension "plpgsql" |
|
68 | 68 | t.string "state_province_name" |
69 | 69 | t.string "postal_code" |
70 | 70 | t.string "country_name" |
71 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 71 | + t.string "privacy", limit: 50, default: "private", null: false |
72 | 72 | t.uuid "contact_detail_id", null: false |
73 | 73 | t.boolean "primary_flag", default: false, null: false |
74 | 74 | t.index ["contact_detail_id", "primary_flag"], name: "index_bt_addresses_on_contact_detail_id_and_primary", unique: true, where: "(primary_flag IS TRUE)" |
|
143 | 143 | t.string "identifier", limit: 100, null: false |
144 | 144 | t.boolean "host", default: false, null: false |
145 | 145 | t.boolean "protected", default: false, null: false |
146 | | - t.string "privacy", limit: 50, default: "public", null: false |
| 146 | + t.string "privacy", limit: 50, default: "private", null: false |
147 | 147 | t.string "slug" |
148 | 148 | t.uuid "creator_id" |
149 | 149 | t.string "type", default: "BetterTogether::Community", null: false |
|
178 | 178 | t.jsonb "media_settings", default: {}, null: false |
179 | 179 | t.jsonb "content_data", default: {} |
180 | 180 | t.uuid "creator_id" |
181 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 181 | + t.string "privacy", limit: 50, default: "private", null: false |
182 | 182 | t.boolean "visible", default: true, null: false |
183 | 183 | t.jsonb "content_area_settings", default: {}, null: false |
184 | 184 | t.index ["creator_id"], name: "by_better_together_content_blocks_creator" |
|
233 | 233 | t.datetime "updated_at", null: false |
234 | 234 | t.string "email", null: false |
235 | 235 | t.string "label", null: false |
236 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 236 | + t.string "privacy", limit: 50, default: "private", null: false |
237 | 237 | t.uuid "contact_detail_id", null: false |
238 | 238 | t.boolean "primary_flag", default: false, null: false |
239 | 239 | t.index ["contact_detail_id", "primary_flag"], name: "index_bt_email_addresses_on_contact_detail_id_and_primary", unique: true, where: "(primary_flag IS TRUE)" |
|
543 | 543 | t.text "meta_description" |
544 | 544 | t.string "keywords" |
545 | 545 | t.datetime "published_at" |
546 | | - t.string "privacy", default: "public", null: false |
| 546 | + t.string "privacy", default: "private", null: false |
547 | 547 | t.string "layout" |
548 | 548 | t.string "template" |
549 | 549 | t.uuid "sidebar_nav_id" |
|
562 | 562 | t.string "slug" |
563 | 563 | t.uuid "community_id", null: false |
564 | 564 | t.jsonb "preferences", default: {}, null: false |
565 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 565 | + t.string "privacy", limit: 50, default: "private", null: false |
566 | 566 | t.index ["community_id"], name: "by_person_community" |
567 | 567 | t.index ["identifier"], name: "index_better_together_people_on_identifier", unique: true |
568 | 568 | t.index ["privacy"], name: "by_better_together_people_privacy" |
|
624 | 624 | t.datetime "updated_at", null: false |
625 | 625 | t.string "number", null: false |
626 | 626 | t.string "label", null: false |
627 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 627 | + t.string "privacy", limit: 50, default: "private", null: false |
628 | 628 | t.uuid "contact_detail_id", null: false |
629 | 629 | t.boolean "primary_flag", default: false, null: false |
630 | 630 | t.index ["contact_detail_id", "primary_flag"], name: "index_bt_phone_numbers_on_contact_detail_id_and_primary", unique: true, where: "(primary_flag IS TRUE)" |
|
649 | 649 | t.datetime "valid_until" |
650 | 650 | t.datetime "last_sent" |
651 | 651 | t.datetime "accepted_at" |
| 652 | + t.string "type", default: "BetterTogether::PlatformInvitation", null: false |
652 | 653 | t.index ["community_role_id"], name: "platform_invitations_by_community_role" |
653 | 654 | t.index ["invitable_id", "status"], name: "index_platform_invitations_on_invitable_id_and_status" |
654 | 655 | t.index ["invitable_id"], name: "platform_invitations_by_invitable" |
|
661 | 662 | t.index ["platform_role_id"], name: "platform_invitations_by_platform_role" |
662 | 663 | t.index ["status"], name: "platform_invitations_by_status" |
663 | 664 | t.index ["token"], name: "platform_invitations_by_token", unique: true |
| 665 | + t.index ["type"], name: "platform_invitations_by_type" |
664 | 666 | t.index ["valid_from"], name: "platform_invitations_by_valid_from" |
665 | 667 | t.index ["valid_until"], name: "platform_invitations_by_valid_until" |
666 | 668 | end |
|
672 | 674 | t.string "identifier", limit: 100, null: false |
673 | 675 | t.boolean "host", default: false, null: false |
674 | 676 | t.boolean "protected", default: false, null: false |
675 | | - t.string "privacy", limit: 50, default: "public", null: false |
| 677 | + t.string "privacy", limit: 50, default: "private", null: false |
676 | 678 | t.string "slug" |
677 | 679 | t.uuid "community_id" |
678 | 680 | t.string "url", null: false |
|
743 | 745 | t.index ["slug"], name: "index_better_together_roles_on_slug", unique: true |
744 | 746 | end |
745 | 747 |
|
| 748 | + create_table "better_together_seeds", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
| 749 | + t.integer "lock_version", default: 0, null: false |
| 750 | + t.datetime "created_at", null: false |
| 751 | + t.datetime "updated_at", null: false |
| 752 | + t.string "type", default: "BetterTogether::Seed", null: false |
| 753 | + t.string "seedable_type" |
| 754 | + t.uuid "seedable_id" |
| 755 | + t.uuid "creator_id" |
| 756 | + t.string "identifier", limit: 100, null: false |
| 757 | + t.string "privacy", limit: 50, default: "private", null: false |
| 758 | + t.string "version", null: false |
| 759 | + t.string "created_by", null: false |
| 760 | + t.datetime "seeded_at", null: false |
| 761 | + t.text "description", null: false |
| 762 | + t.jsonb "origin", null: false |
| 763 | + t.jsonb "payload", null: false |
| 764 | + t.index ["creator_id"], name: "by_better_together_seeds_creator" |
| 765 | + t.index ["identifier"], name: "index_better_together_seeds_on_identifier", unique: true |
| 766 | + t.index ["origin"], name: "index_better_together_seeds_on_origin", using: :gin |
| 767 | + t.index ["payload"], name: "index_better_together_seeds_on_payload", using: :gin |
| 768 | + t.index ["privacy"], name: "by_better_together_seeds_privacy" |
| 769 | + t.index ["seedable_type", "seedable_id"], name: "index_better_together_seeds_on_seedable" |
| 770 | + t.index ["type", "identifier"], name: "index_better_together_seeds_on_type_and_identifier", unique: true |
| 771 | + end |
| 772 | + |
746 | 773 | create_table "better_together_social_media_accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
747 | 774 | t.integer "lock_version", default: 0, null: false |
748 | 775 | t.datetime "created_at", null: false |
749 | 776 | t.datetime "updated_at", null: false |
750 | 777 | t.string "platform", null: false |
751 | 778 | t.string "handle", null: false |
752 | 779 | t.string "url" |
753 | | - t.string "privacy", limit: 50, default: "public", null: false |
| 780 | + t.string "privacy", limit: 50, default: "private", null: false |
754 | 781 | t.uuid "contact_detail_id", null: false |
755 | 782 | t.index ["contact_detail_id", "platform"], name: "index_bt_sma_on_contact_detail_and_platform", unique: true |
756 | 783 | t.index ["contact_detail_id"], name: "idx_on_contact_detail_id_6380b64b3b" |
|
790 | 817 | t.datetime "updated_at", null: false |
791 | 818 | t.string "url", null: false |
792 | 819 | t.string "label", null: false |
793 | | - t.string "privacy", limit: 50, default: "unlisted", null: false |
| 820 | + t.string "privacy", limit: 50, default: "private", null: false |
794 | 821 | t.uuid "contact_detail_id", null: false |
795 | 822 | t.index ["contact_detail_id"], name: "index_better_together_website_links_on_contact_detail_id" |
796 | 823 | t.index ["privacy"], name: "by_better_together_website_links_privacy" |
|
968 | 995 | add_foreign_key "better_together_platforms", "better_together_communities", column: "community_id" |
969 | 996 | add_foreign_key "better_together_role_resource_permissions", "better_together_resource_permissions", column: "resource_permission_id" |
970 | 997 | add_foreign_key "better_together_role_resource_permissions", "better_together_roles", column: "role_id" |
| 998 | + add_foreign_key "better_together_seeds", "better_together_people", column: "creator_id" |
971 | 999 | add_foreign_key "better_together_social_media_accounts", "better_together_contact_details", column: "contact_detail_id" |
972 | 1000 | add_foreign_key "better_together_website_links", "better_together_contact_details", column: "contact_detail_id" |
973 | 1001 | add_foreign_key "better_together_wizard_step_definitions", "better_together_wizards", column: "wizard_id" |
|
0 commit comments