add revisions

This commit is contained in:
Pete Matsyburka
2026-05-07 09:48:25 +03:00
parent 04ec2f8260
commit 10fd624bec
16 changed files with 462 additions and 17 deletions
+17 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_05_06_120000) do
ActiveRecord::Schema[8.1].define(version: 2026_05_06_121640) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "pg_catalog.plpgsql"
@@ -444,6 +444,19 @@ ActiveRecord::Schema[8.1].define(version: 2026_05_06_120000) do
t.index ["template_id"], name: "index_template_sharings_on_template_id"
end
create_table "template_versions", force: :cascade do |t|
t.bigint "account_id", null: false
t.bigint "author_id", null: false
t.datetime "created_at", null: false
t.text "data", null: false
t.string "sha1", null: false
t.bigint "template_id", null: false
t.datetime "updated_at", null: false
t.index ["account_id"], name: "index_template_versions_on_account_id"
t.index ["author_id"], name: "index_template_versions_on_author_id"
t.index ["template_id", "sha1"], name: "index_template_versions_on_template_id_and_sha1", unique: true
end
create_table "templates", force: :cascade do |t|
t.bigint "account_id", null: false
t.datetime "archived_at"
@@ -587,6 +600,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_05_06_120000) do
add_foreign_key "template_folders", "template_folders", column: "parent_folder_id"
add_foreign_key "template_folders", "users", column: "author_id"
add_foreign_key "template_sharings", "templates"
add_foreign_key "template_versions", "accounts"
add_foreign_key "template_versions", "templates"
add_foreign_key "template_versions", "users", column: "author_id"
add_foreign_key "templates", "accounts"
add_foreign_key "templates", "template_folders", column: "folder_id"
add_foreign_key "templates", "users", column: "author_id"