-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: org and user avatar presigned url; remove additional field (#382)
* feat: add avatar file for organizations, add presigned urls for all file queries Signed-off-by: Sarah Funkhouser <[email protected]> * fix bug Signed-off-by: Sarah Funkhouser <[email protected]> * generate config Signed-off-by: Sarah Funkhouser <[email protected]> * fix tests, run generate Signed-off-by: Sarah Funkhouser <[email protected]> * Fix comments Signed-off-by: Sarah Funkhouser <[email protected]> --------- Signed-off-by: Sarah Funkhouser <[email protected]>
- Loading branch information
1 parent
647a80d
commit 86423d2
Showing
95 changed files
with
5,133 additions
and
2,562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
db/migrations-goose-postgres/20250114212723_avatar_files.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- +goose Up | ||
-- modify "organization_history" table | ||
ALTER TABLE "organization_history" ADD COLUMN "avatar_local_file_id" character varying NULL, ADD COLUMN "avatar_updated_at" timestamptz NULL; | ||
-- modify "user_history" table | ||
ALTER TABLE "user_history" DROP COLUMN "avatar_local_file"; | ||
-- modify "organizations" table | ||
ALTER TABLE "organizations" ADD COLUMN "avatar_updated_at" timestamptz NULL, ADD COLUMN "avatar_local_file_id" character varying NULL, ADD CONSTRAINT "organizations_files_avatar_file" FOREIGN KEY ("avatar_local_file_id") REFERENCES "files" ("id") ON UPDATE NO ACTION ON DELETE SET NULL; | ||
-- modify "users" table | ||
ALTER TABLE "users" DROP CONSTRAINT "users_files_file", DROP COLUMN "avatar_local_file", ADD CONSTRAINT "users_files_avatar_file" FOREIGN KEY ("avatar_local_file_id") REFERENCES "files" ("id") ON UPDATE NO ACTION ON DELETE SET NULL; | ||
|
||
-- +goose Down | ||
-- reverse: modify "users" table | ||
ALTER TABLE "users" DROP CONSTRAINT "users_files_avatar_file", ADD COLUMN "avatar_local_file" character varying NULL, ADD CONSTRAINT "users_files_file" FOREIGN KEY ("avatar_local_file_id") REFERENCES "files" ("id") ON UPDATE NO ACTION ON DELETE SET NULL; | ||
-- reverse: modify "organizations" table | ||
ALTER TABLE "organizations" DROP CONSTRAINT "organizations_files_avatar_file", DROP COLUMN "avatar_local_file_id", DROP COLUMN "avatar_updated_at"; | ||
-- reverse: modify "user_history" table | ||
ALTER TABLE "user_history" ADD COLUMN "avatar_local_file" character varying NULL; | ||
-- reverse: modify "organization_history" table | ||
ALTER TABLE "organization_history" DROP COLUMN "avatar_updated_at", DROP COLUMN "avatar_local_file_id"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
h1:qOVARrtau4JhKV7gKSBoYBVqrfJctYhpjEu7VsnI0cY= | ||
h1:I6+x6Xrpl6vRY8YmytqV1hS1C6AN5rIiydu0/AibHFo= | ||
20241211231032_init.sql h1:Cj6GduEDECy6Y+8DfI6767WosqG2AKWybIyJJ6AgKqA= | ||
20241212223714_consistent_naming.sql h1:RvnNmsStlHkmAdSCnX1fFh/KYgfj1RMYYEc4iCN9JcQ= | ||
20250109002850_billing_address.sql h1:m0ek3WXqRgS3+ZbSa/DcIMB16vb8Tjm2MgNqyRll3rU= | ||
20250109054654_remove_stripe_id.sql h1:OfeshKT2+ydfx+36e4uBrdQ31tuurcJsKXyYDp1ZiZg= | ||
20250110162830_subscription_price.sql h1:ju8ocKPbqtOalaBZ1aGk8qCDLbgxFCDoA0Dmkr9bLzA= | ||
20250110233413_orgsubsfeatures.sql h1:bEdXn+bDT7GuWRRkCYiFCK6t91DxjeEmkFWme2K/lCw= | ||
20250114212723_avatar_files.sql h1:CmUGP2CRigFaGGhFdUt0uIDTOSy1HhIqao++18/KWsU= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Modify "organization_history" table | ||
ALTER TABLE "organization_history" ADD COLUMN "avatar_local_file_id" character varying NULL, ADD COLUMN "avatar_updated_at" timestamptz NULL; | ||
-- Modify "user_history" table | ||
ALTER TABLE "user_history" DROP COLUMN "avatar_local_file"; | ||
-- Modify "organizations" table | ||
ALTER TABLE "organizations" ADD COLUMN "avatar_updated_at" timestamptz NULL, ADD COLUMN "avatar_local_file_id" character varying NULL, ADD CONSTRAINT "organizations_files_avatar_file" FOREIGN KEY ("avatar_local_file_id") REFERENCES "files" ("id") ON UPDATE NO ACTION ON DELETE SET NULL; | ||
-- Modify "users" table | ||
ALTER TABLE "users" DROP CONSTRAINT "users_files_file", DROP COLUMN "avatar_local_file", ADD CONSTRAINT "users_files_avatar_file" FOREIGN KEY ("avatar_local_file_id") REFERENCES "files" ("id") ON UPDATE NO ACTION ON DELETE SET NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
h1:FGyFOEh4ppoGd8KFzmyYNWHxBSlqreNG+TaZcAn068s= | ||
h1:nnvTXfxLz/fAZVJmA5IH5Wq/G2NRRReWMDac4P6EMmY= | ||
20241211231032_init.sql h1:TxjpHzKPB/5L2i7V2JfO1y+Cep/AyQN5wGjhY7saCeE= | ||
20241212223712_consistent_naming.sql h1:tbdYOtixhW66Jmvy3aCm+X6neI/SRVvItKM0Bdn26TA= | ||
20250109002849_billing_address.sql h1:mspCGbJ6HVmx3r4j+d/WvruzirJdJ8u5x18WF9R9ESE= | ||
20250109054653_remove_stripe_id.sql h1:dB086/w/Ws7ZK8OvbRWX7ejN4HfizCKxcE3q/+Jv4U8= | ||
20250110162828_subscription_price.sql h1:RlvrTtH6+PIFuJ+Fp5S06w0ho3B2O/Nn6QcWqSHLWEA= | ||
20250110233411_orgsubsfeatures.sql h1:ZPBc/gedwoVMzJz6M/AN3yhtRmqdTuZsPvfIsWQj4fY= | ||
20250114212722_avatar_files.sql h1:exooeELaAAu1jCnyjtok9WDC7WUxoPIeE6EBGFwhplU= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.