mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Migrate Attachments columns from marshalled blobs to JSON
Summary: Adds a migration in preparation for future work on tracking and deleting attachments. This includes a `_grist_Attachments.timeDeleted` column which isn't used yet, and changing the storage format of user columns of type `Attachments`. DocStorage now treats Attachments like RefList in general (since they use JSON), which also prompted a tiny bit of refactoring. Test Plan: Added a migration test case showing the change in format. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3352
This commit is contained in:
@@ -15,7 +15,7 @@ import six
|
||||
|
||||
import actions
|
||||
|
||||
SCHEMA_VERSION = 27
|
||||
SCHEMA_VERSION = 28
|
||||
|
||||
def make_column(col_id, col_type, formula='', isFormula=False):
|
||||
return {
|
||||
@@ -235,6 +235,7 @@ def schema_create_actions():
|
||||
make_column("fileSize", "Int"), # The size in bytes
|
||||
make_column("imageHeight", "Int"), # height in pixels
|
||||
make_column("imageWidth", "Int"), # width in pixels
|
||||
make_column("timeDeleted", "DateTime"),
|
||||
make_column("timeUploaded", "DateTime")
|
||||
]),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user