Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
samwillis committed Nov 20, 2024
1 parent 0e3fad3 commit b1245af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions demos/linearlite/db/migrations-client/01-create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ BEGIN
FOR col_name IN SELECT column_name
FROM information_schema.columns
WHERE table_name = TG_TABLE_NAME AND
column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server') LOOP
column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server', 'search_vector') LOOP
EXECUTE format('SELECT $1.%I', col_name) USING NEW INTO new_value;
EXECUTE format('SELECT %I FROM %I WHERE id = $1', col_name, TG_TABLE_NAME) USING NEW.id INTO old_value;
IF new_value IS DISTINCT FROM old_value THEN
Expand All @@ -161,7 +161,7 @@ BEGIN
SELECT array_agg(column_name) INTO modified_columns
FROM information_schema.columns
WHERE table_name = TG_TABLE_NAME
AND column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server');
AND column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server', 'search_vector');
NEW.modified_columns := modified_columns;
NEW.new := TRUE;
END IF;
Expand Down Expand Up @@ -223,7 +223,7 @@ BEGIN
FOR column_name IN SELECT columns.column_name
FROM information_schema.columns
WHERE columns.table_name = TG_TABLE_NAME
AND columns.column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server') LOOP
AND columns.column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server', 'search_vector') LOOP
IF column_name != ANY(OLD.modified_columns) THEN
EXECUTE format('SELECT ($1).%I', column_name) USING NEW INTO new_value;
EXECUTE format('SELECT ($1).%I', column_name) USING OLD INTO old_value;
Expand All @@ -240,7 +240,7 @@ BEGIN
FOR column_name IN SELECT columns.column_name
FROM information_schema.columns
WHERE columns.table_name = TG_TABLE_NAME
AND columns.column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server') LOOP
AND columns.column_name NOT IN ('id', 'synced', 'modified_columns', 'backup', 'deleted', 'new', 'sent_to_server', 'search_vector') LOOP
EXECUTE format('SELECT ($1).%I', column_name) USING NEW INTO new_value;
EXECUTE format('SELECT ($1).%I', column_name) USING OLD INTO old_value;
IF new_value IS DISTINCT FROM old_value THEN
Expand Down
4 changes: 2 additions & 2 deletions demos/linearlite/src/components/TopFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ export default function ({
<div className="p-1 font-semibold me-1">{title}</div>
{/* <span>{filteredIssuesCount}</span> */}
<span>
{filteredIssuesCount}
{filteredIssuesCount.toLocaleString()}
{totalIssuesCount !== undefined &&
filteredIssuesCount !== totalIssuesCount
? ` of ${totalIssuesCount}`
? ` of ${totalIssuesCount.toLocaleString()}`
: ``}
</span>
<FilterMenu
Expand Down

0 comments on commit b1245af

Please sign in to comment.