Polish quiz completion UX, room PNG backgrounds, and habits list order
Polish quiz completion UX, rooms, and app layout.
This commit is contained in:
59
supabase/migrations/20260525200000_room_png_ids.sql
Normal file
59
supabase/migrations/20260525200000_room_png_ids.sql
Normal file
@@ -0,0 +1,59 @@
|
||||
-- Room backgrounds: PNG assets in /public/room with ids room-1 .. room-4.
|
||||
|
||||
alter table public.avatar_state
|
||||
alter column room_background set default 'room-1';
|
||||
|
||||
update public.avatar_state
|
||||
set room_background = case room_background
|
||||
when 'room-day' then 'room-1'
|
||||
when 'room-dusk' then 'room-2'
|
||||
when 'room-night' then 'room-3'
|
||||
when 'room-forest' then 'room-4'
|
||||
when 'room-space' then 'room-1'
|
||||
when 'room-neon' then 'room-1'
|
||||
else room_background
|
||||
end
|
||||
where room_background in (
|
||||
'room-day',
|
||||
'room-dusk',
|
||||
'room-night',
|
||||
'room-forest',
|
||||
'room-space',
|
||||
'room-neon'
|
||||
);
|
||||
|
||||
update public.user_items
|
||||
set item_id = case item_id
|
||||
when 'room-night' then 'room-3'
|
||||
when 'room-forest' then 'room-4'
|
||||
else item_id
|
||||
end
|
||||
where item_id in ('room-night', 'room-forest');
|
||||
|
||||
delete from public.shop_items
|
||||
where id in ('room-night', 'room-forest');
|
||||
|
||||
insert into public.shop_items (id, name, type, price, image_path)
|
||||
values
|
||||
('room-3', 'Starlit Night', 'room', 40, '/room/room-3.png'),
|
||||
('room-4', 'Mystic Forest', 'room', 50, '/room/room-4.png')
|
||||
on conflict (id) do update
|
||||
set
|
||||
name = excluded.name,
|
||||
type = excluded.type,
|
||||
price = excluded.price,
|
||||
image_path = excluded.image_path;
|
||||
|
||||
alter table public.avatar_state
|
||||
drop constraint if exists avatar_state_room_background_check;
|
||||
|
||||
alter table public.avatar_state
|
||||
add constraint avatar_state_room_background_check
|
||||
check (
|
||||
room_background in (
|
||||
'room-1',
|
||||
'room-2',
|
||||
'room-3',
|
||||
'room-4'
|
||||
)
|
||||
);
|
||||
@@ -33,8 +33,8 @@ values
|
||||
('head-5', 'Shoulder-Length Hair', 'head', 50, '/character/head/head-5.png'),
|
||||
('head-6', 'Flowing Side Locks', 'head', 55, '/character/head/head-6.png'),
|
||||
('head-7', 'Messy Shag Cut', 'head', 60, '/character/head/head-7.png'),
|
||||
('room-night', 'Starlit Night', 'room', 40, '/shop/room-night.svg'),
|
||||
('room-forest', 'Mystic Forest', 'room', 50, '/shop/room-forest.svg')
|
||||
('room-3', 'Starlit Night', 'room', 40, '/room/room-3.png'),
|
||||
('room-4', 'Mystic Forest', 'room', 50, '/room/room-4.png')
|
||||
on conflict (id) do update
|
||||
set
|
||||
name = excluded.name,
|
||||
|
||||
Reference in New Issue
Block a user