Skip to content

Commit

Permalink
v2024.3.0-prealpha
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Mar 8, 2024
1 parent 4587c71 commit 7617234
Show file tree
Hide file tree
Showing 86 changed files with 1,348 additions and 2,301 deletions.
883 changes: 106 additions & 777 deletions CHANGELOG.md

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions VERSION.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"version": "2023.12.0-alpha.7",
"versionMajor": 2023,
"versionMinor": 12,
"version": "2024.3.0-prealpha",
"versionMajor": 2024,
"versionMinor": 3,
"versionPatch": 0,
"versionPrerelease": [
"alpha",
7
"prealpha"
],
"release": "2023.12.0-alpha.7+20231220192300",
"gitSha": "086e28c1b50d5a229fc0140ff39f4776952fb492",
"gitDate": "2023-12-21T03:23:00.000Z"
"release": "2024.3.0-prealpha+20240308102353",
"gitSha": "92cba1b21937cb9ca770f6a339e44b0fbee04bf9",
"gitDate": "2024-03-08T18:23:53.000Z"
}
4 changes: 2 additions & 2 deletions bin/info.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/info.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/list.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/list.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/logcat.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/logcat.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/logtail.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/logtail.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/main.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/main.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/photostructure.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/photostructure.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/sync.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/sync.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/web.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/web.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions bin/worker.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bin/worker.js.map

This file was deleted.

Binary file modified data/cuss.txt.br
Binary file not shown.
184 changes: 89 additions & 95 deletions data/migrations/models/20181030_models.sql
Original file line number Diff line number Diff line change
@@ -1,105 +1,100 @@
CREATE TABLE
IF NOT EXISTS Example (
-- used for integration tests
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
isExample INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);
CREATE TABLE IF NOT EXISTS Example (
-- used for integration tests
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
isExample INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS example_name_udx ON Example (name);

CREATE TABLE
IF NOT EXISTS Progress (
-- records sync process state
id INTEGER NOT NULL PRIMARY KEY,
uri VARCHAR(255) NOT NULL,
volume VARCHAR(255) NOT NULL,
state VARCHAR(255),
hed VARCHAR(255),
dekJSON VARCHAR(255),
completePct INTEGER,
incompletePct INTEGER,
scanningPct INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);
CREATE TABLE IF NOT EXISTS Progress (
-- records sync process state
id INTEGER NOT NULL PRIMARY KEY,
uri VARCHAR(255) NOT NULL,
volume VARCHAR(255) NOT NULL,
state VARCHAR(255),
hed VARCHAR(255),
dekJSON VARCHAR(255),
completePct INTEGER,
incompletePct INTEGER,
scanningPct INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS progress_uri_udx ON Progress (uri);

CREATE TABLE
IF NOT EXISTS Tag (
-- Tags are associated to Assets and support hierarchies.
id INTEGER NOT NULL PRIMARY KEY,
parentId INTEGER,
-- this is the full path of the Tag, and is an ASCII SEP-separated string.
_path VARCHAR(2048) NOT NULL,
ordinal INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (parentId) REFERENCES Tag (id)
);
CREATE TABLE IF NOT EXISTS Tag (
-- Tags are associated to Assets and support hierarchies.
id INTEGER NOT NULL PRIMARY KEY,
parentId INTEGER,
-- this is the full path of the Tag, and is an ASCII SEP-separated string.
_path VARCHAR(2048) NOT NULL,
ordinal INTEGER,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (parentId) REFERENCES Tag (id)
);

CREATE UNIQUE INDEX IF NOT EXISTS tag_path_udx ON Tag (_path);

CREATE TABLE
IF NOT EXISTS Asset -- Asset). -- heuristics (to make sure, for example, that RAW/JPEG pairs share the same -- AssetFiles. AssetFiles are coalesced with existing Assets based on Curator -- An Asset embodies an item in a library, backed by 1 or more "related"
(
id INTEGER NOT NULL PRIMARY KEY,
-- true if the asset *can* be shown
shown INTEGER NOT NULL DEFAULT 0,
-- hidden is only set to true by the user
hidden INTEGER NOT NULL DEFAULT 0,
description VARCHAR(512),
geohash BIGINT,
capturedAt BIGINT NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);
CREATE TABLE IF NOT EXISTS Asset -- Asset). -- heuristics (to make sure, for example, that RAW/JPEG pairs share the same -- AssetFiles. AssetFiles are coalesced with existing Assets based on Curator -- An Asset embodies an item in a library, backed by 1 or more "related"
(
id INTEGER NOT NULL PRIMARY KEY,
-- true if the asset *can* be shown
shown INTEGER NOT NULL DEFAULT 0,
-- hidden is only set to true by the user
hidden INTEGER NOT NULL DEFAULT 0,
description VARCHAR(512),
geohash BIGINT,
capturedAt BIGINT NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);

CREATE INDEX IF NOT EXISTS asset_timeline ON Asset (capturedAt)
WHERE
shown = 1
AND hidden = 0;

CREATE TABLE
IF NOT EXISTS AssetFile (
-- Asset, and is the file revision that will be shown for the Asset. -- exactly one Asset. There should be only one "shown" AssetFile for a given -- An AssetFile points to a file (via the URI) and is always associated to
id INTEGER NOT NULL PRIMARY KEY,
assetId INTEGER NOT NULL,
-- boolean(1 == true), true for the instance of an asset file that is shown
-- in the UI for the given assetId
shown INTEGER NOT NULL DEFAULT 0,
-- May be longer than 1 K as this is the full native path to files:
uri VARCHAR(2048) NOT NULL,
-- The mountpoint is encoded in the uri, but if it goes missing, this allows
-- the URI to be reconstituted as a full native path.
mountpoint VARCHAR(2048),
mimetype VARCHAR(64) NOT NULL,
sha VARCHAR(64) NOT NULL,
exifUid VARCHAR(255),
-- This is the ISO-encoded datestamp of when this AssetFile was captured. This
-- may not have a timezone offset, nor have time resolution at all. It may be
-- an interval string if the value is interpolated from siblings.
capturedAtISO VARCHAR(64),
-- As capturedAt may be inferred, this holds the name of the inferral function
-- that generated the capturedAt.
capturedAtSrc VARCHAR(8),
focalLength VARCHAR(16),
aperture FLOAT,
shutterSpeed VARCHAR(16),
iso INTEGER,
width INTEGER,
height INTEGER,
-- mtime and fileSize is used to quickly pre-check if a file has been updated
-- (rather than reading the entire contents of the file and comparing SHAs)
mtime INTEGER NOT NULL,
fileSize INTEGER NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);
CREATE TABLE IF NOT EXISTS AssetFile (
-- Asset, and is the file revision that will be shown for the Asset. -- exactly one Asset. There should be only one "shown" AssetFile for a given -- An AssetFile points to a file (via the URI) and is always associated to
id INTEGER NOT NULL PRIMARY KEY,
assetId INTEGER NOT NULL,
-- boolean(1 == true), true for the instance of an asset file that is shown
-- in the UI for the given assetId
shown INTEGER NOT NULL DEFAULT 0,
-- May be longer than 1 K as this is the full native path to files:
uri VARCHAR(2048) NOT NULL,
-- The mountpoint is encoded in the uri, but if it goes missing, this allows
-- the URI to be reconstituted as a full native path.
mountpoint VARCHAR(2048),
mimetype VARCHAR(64) NOT NULL,
sha VARCHAR(64) NOT NULL,
exifUid VARCHAR(255),
-- This is the ISO-encoded datestamp of when this AssetFile was captured. This
-- may not have a timezone offset, nor have time resolution at all. It may be
-- an interval string if the value is interpolated from siblings.
capturedAtISO VARCHAR(64),
-- As capturedAt may be inferred, this holds the name of the inferral function
-- that generated the capturedAt.
capturedAtSrc VARCHAR(8),
focalLength VARCHAR(16),
aperture FLOAT,
shutterSpeed VARCHAR(16),
iso INTEGER,
width INTEGER,
height INTEGER,
-- mtime and fileSize is used to quickly pre-check if a file has been updated
-- (rather than reading the entire contents of the file and comparing SHAs)
mtime INTEGER NOT NULL,
fileSize INTEGER NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);

CREATE UNIQUE INDEX IF NOT EXISTS assetfile_uri_udx ON AssetFile (uri);

Expand All @@ -114,13 +109,12 @@ CREATE UNIQUE INDEX IF NOT EXISTS assetfile_shown_udx ON AssetFile (assetId)
WHERE
shown = 1;

CREATE TABLE
IF NOT EXISTS AssetTag (
-- join table to associate Assets to Tags.
assetId INTEGER NOT NULL,
tagId INTEGER NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id) ON DELETE CASCADE,
FOREIGN KEY (tagId) REFERENCES Tag (id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS AssetTag (
-- join table to associate Assets to Tags.
assetId INTEGER NOT NULL,
tagId INTEGER NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id) ON DELETE CASCADE,
FOREIGN KEY (tagId) REFERENCES Tag (id) ON DELETE CASCADE
);

CREATE UNIQUE INDEX IF NOT EXISTS assettag_fks ON AssetTag (assetId, tagId);
19 changes: 9 additions & 10 deletions data/migrations/models/20190425_merged_assets.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
CREATE TABLE
IF NOT EXISTS MergedAsset (
-- When Exif UIDs are updated (like v5) and previously-separated assets are
-- merged, this table stores those redirections.
-- id is the "merge victim", the asset id that doesn't exist anymore.
id INTEGER NOT NULL PRIMARY KEY,
-- assetId is the "merge victor", the asset that currently exists and subsumed the prior asset.
assetId INTEGER NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);
CREATE TABLE IF NOT EXISTS MergedAsset (
-- When Exif UIDs are updated (like v5) and previously-separated assets are
-- merged, this table stores those redirections.
-- id is the "merge victim", the asset id that doesn't exist anymore.
id INTEGER NOT NULL PRIMARY KEY,
-- assetId is the "merge victor", the asset that currently exists and subsumed the prior asset.
assetId INTEGER NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);
11 changes: 5 additions & 6 deletions data/migrations/models/20190730_session.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CREATE TABLE
IF NOT EXISTS Session (
sid VARCHAR(255) NOT NULL PRIMARY KEY,
expired BIGINT NOT NULL,
sess VARCHAR(2048) NOT NULL
);
CREATE TABLE IF NOT EXISTS Session (
sid VARCHAR(255) NOT NULL PRIMARY KEY,
expired BIGINT NOT NULL,
sess VARCHAR(2048) NOT NULL
);
71 changes: 35 additions & 36 deletions data/migrations/models/20190923_asset_file_v2_nofk.sql
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
CREATE TABLE
new_AssetFile (
id INTEGER NOT NULL PRIMARY KEY,
assetId INTEGER NOT NULL,
shown INTEGER NOT NULL DEFAULT 0,
uri VARCHAR(2048) NOT NULL,
mountpoint VARCHAR(1024),
mtime INTEGER NOT NULL,
fileSize INTEGER NOT NULL,
mimetype VARCHAR(64) NOT NULL,
sha VARCHAR(64) NOT NULL,
capturedAtLocal BIGINT NOT NULL,
capturedAtOffset INTEGER NULL,
capturedAtPrecisionMs INTEGER NULL,
capturedAtSrc VARCHAR(8) NOT NULL,
focalLength VARCHAR(16),
aperture float,
shutterSpeed VARCHAR(16),
iso INTEGER,
width INTEGER,
height INTEGER,
rotation INTEGER,
make VARCHAR(16),
model VARCHAR(16),
cameraId VARCHAR(64),
imageId VARCHAR(64),
lensId VARCHAR(64),
geohash INTEGER,
meanHash VARCHAR(64),
rightHash VARCHAR(64),
mode8b6 INTEGER,
version INTEGER NOT NULL DEFAULT 0,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);
CREATE TABLE new_AssetFile (
id INTEGER NOT NULL PRIMARY KEY,
assetId INTEGER NOT NULL,
shown INTEGER NOT NULL DEFAULT 0,
uri VARCHAR(2048) NOT NULL,
mountpoint VARCHAR(1024),
mtime INTEGER NOT NULL,
fileSize INTEGER NOT NULL,
mimetype VARCHAR(64) NOT NULL,
sha VARCHAR(64) NOT NULL,
capturedAtLocal BIGINT NOT NULL,
capturedAtOffset INTEGER NULL,
capturedAtPrecisionMs INTEGER NULL,
capturedAtSrc VARCHAR(8) NOT NULL,
focalLength VARCHAR(16),
aperture float,
shutterSpeed VARCHAR(16),
iso INTEGER,
width INTEGER,
height INTEGER,
rotation INTEGER,
make VARCHAR(16),
model VARCHAR(16),
cameraId VARCHAR(64),
imageId VARCHAR(64),
lensId VARCHAR(64),
geohash INTEGER,
meanHash VARCHAR(64),
rightHash VARCHAR(64),
mode8b6 INTEGER,
version INTEGER NOT NULL DEFAULT 0,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL,
FOREIGN KEY (assetId) REFERENCES Asset (id)
);

INSERT INTO
new_AssetFile
Expand Down
21 changes: 10 additions & 11 deletions data/migrations/models/20191013_asset_v2_nofk.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@ SET
WHERE
capturedAtLocal IS NULL;

CREATE TABLE
new_Asset (
id INTEGER NOT NULL PRIMARY KEY,
capturedAtLocal INTEGER NOT NULL,
shown INTEGER NOT NULL DEFAULT 0,
hidden INTEGER NOT NULL DEFAULT 0,
favorite INTEGER DEFAULT 0,
version INTEGER NOT NULL DEFAULT 0,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);
CREATE TABLE new_Asset (
id INTEGER NOT NULL PRIMARY KEY,
capturedAtLocal INTEGER NOT NULL,
shown INTEGER NOT NULL DEFAULT 0,
hidden INTEGER NOT NULL DEFAULT 0,
favorite INTEGER DEFAULT 0,
version INTEGER NOT NULL DEFAULT 0,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);

INSERT INTO
new_Asset
Expand Down
15 changes: 7 additions & 8 deletions data/migrations/models/20200116_heartbeat.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
CREATE TABLE
IF NOT EXISTS Heartbeat (
-- used for db health checks
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);
CREATE TABLE IF NOT EXISTS Heartbeat (
-- used for db health checks
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
createdAt BIGINT NOT NULL,
updatedAt BIGINT NOT NULL
);

CREATE UNIQUE INDEX IF NOT EXISTS heartbeat_name_udx ON Heartbeat (name);
Loading

0 comments on commit 7617234

Please sign in to comment.