Add "data export" feature
- Adds a button in Account Settings where you can request a ZIP export of your Fizzy data - Export files are created in the background. When ready, a link to download them is sent to the requester. - Exports expire after 24 hours. And are limited to 10 per day.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class CreateAccountExports < ActiveRecord::Migration[8.2]
|
||||
def change
|
||||
create_table :account_exports, id: :uuid do |t|
|
||||
t.uuid :account_id, null: false
|
||||
t.uuid :user_id, null: false
|
||||
t.string :status, default: "pending", null: false
|
||||
t.datetime :completed_at
|
||||
t.timestamps
|
||||
|
||||
t.index :account_id
|
||||
t.index :user_id
|
||||
end
|
||||
end
|
||||
end
|
||||
Generated
+12
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.2].define(version: 2025_11_29_175717) do
|
||||
ActiveRecord::Schema[8.2].define(version: 2025_12_01_100607) do
|
||||
create_table "accesses", id: :uuid, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.datetime "accessed_at"
|
||||
t.uuid "account_id", null: false
|
||||
@@ -25,6 +25,17 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_29_175717) do
|
||||
t.index ["user_id"], name: "index_accesses_on_user_id"
|
||||
end
|
||||
|
||||
create_table "account_exports", id: :uuid, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.uuid "account_id", null: false
|
||||
t.datetime "completed_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "status", default: "pending", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.uuid "user_id", null: false
|
||||
t.index ["account_id"], name: "index_account_exports_on_account_id"
|
||||
t.index ["user_id"], name: "index_account_exports_on_user_id"
|
||||
end
|
||||
|
||||
create_table "account_external_id_sequences", id: :uuid, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.bigint "value", default: 0, null: false
|
||||
t.index ["value"], name: "index_account_external_id_sequences_on_value", unique: true
|
||||
|
||||
+12
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.2].define(version: 2025_11_29_175717) do
|
||||
ActiveRecord::Schema[8.2].define(version: 2025_12_01_100607) do
|
||||
create_table "accesses", id: :uuid, force: :cascade do |t|
|
||||
t.datetime "accessed_at"
|
||||
t.uuid "account_id", null: false
|
||||
@@ -25,6 +25,17 @@ ActiveRecord::Schema[8.2].define(version: 2025_11_29_175717) do
|
||||
t.index ["user_id"], name: "index_accesses_on_user_id"
|
||||
end
|
||||
|
||||
create_table "account_exports", id: :uuid, force: :cascade do |t|
|
||||
t.uuid "account_id", null: false
|
||||
t.datetime "completed_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "status", limit: 255, default: "pending", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.uuid "user_id", null: false
|
||||
t.index ["account_id"], name: "index_account_exports_on_account_id"
|
||||
t.index ["user_id"], name: "index_account_exports_on_user_id"
|
||||
end
|
||||
|
||||
create_table "account_external_id_sequences", id: :uuid, force: :cascade do |t|
|
||||
t.bigint "value", default: 0, null: false
|
||||
t.index ["value"], name: "index_account_external_id_sequences_on_value", unique: true
|
||||
|
||||
Reference in New Issue
Block a user