mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
🐛 Don't change modified_at on rename projects and files.
This commit is contained in:
parent
cba690ead8
commit
a6adae4f28
2 changed files with 4 additions and 16 deletions
|
@ -14,10 +14,6 @@ CREATE TABLE project (
|
|||
CREATE INDEX project__team_id__idx
|
||||
ON project(team_id);
|
||||
|
||||
CREATE TRIGGER project__modified_at__tgr
|
||||
BEFORE UPDATE ON project
|
||||
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
||||
|
||||
|
||||
|
||||
CREATE TABLE project_profile_rel (
|
||||
|
@ -56,11 +52,6 @@ CREATE TABLE file (
|
|||
name text NOT NULL
|
||||
);
|
||||
|
||||
CREATE TRIGGER file__modified_at__tgr
|
||||
BEFORE UPDATE ON file
|
||||
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
||||
|
||||
|
||||
CREATE TABLE file_profile_rel (
|
||||
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE,
|
||||
profile_id uuid NOT NULL REFERENCES profile(id) ON DELETE CASCADE,
|
||||
|
@ -85,11 +76,10 @@ CREATE INDEX file_profile_rel__file_id__idx
|
|||
ON file_profile_rel(file_id);
|
||||
|
||||
CREATE TRIGGER file_profile_rel__modified_at__tgr
|
||||
BEFORE UPDATE ON file
|
||||
BEFORE UPDATE ON file_profile_rel
|
||||
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
||||
|
||||
|
||||
|
||||
CREATE TABLE file_image (
|
||||
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE,
|
||||
|
|
|
@ -49,11 +49,9 @@
|
|||
[:div.recent-files-row-title
|
||||
[:h2.recent-files-row-title-name (:name project)]
|
||||
[:span.recent-files-row-title-info (str (:file-count project) " files")]
|
||||
(when files
|
||||
(let [time (-> (first files)
|
||||
(:modified-at)
|
||||
(dt/timeago {:locale locale}))]
|
||||
[:span.recent-files-row-title-info (str ", " time)]))]
|
||||
(let [time (-> (:modified-at project)
|
||||
(dt/timeago {:locale locale}))]
|
||||
[:span.recent-files-row-title-info (str ", " time)])]
|
||||
[:& grid {:id (:id project)
|
||||
:files (or files [])
|
||||
:hide-new? true}]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue