stash/pkg/sqlite/migrations
WithoutPants 7db394bbea
Date precision (#6359)
* Remove month/year only formats from ParseDateStringAsTime
* Add precision field to Date and handle parsing year/month-only dates
* Add date precision columns for date columns
* Adjust UI to account for fuzzy dates
2025-12-08 09:11:40 +11:00
..
1_initial.down.sql
1_initial.up.sql
2_cover_image.up.sql
3_o_counter.up.sql
4_movie.up.sql
5_performer_gender.down.sql
5_performer_gender.up.sql
6_scenes_format.up.sql
7_performer_optimization.up.sql
8_movie_fix.up.sql
9_studios_parent_studio.up.sql
10_image_tables.up.sql
11_tag_image.up.sql
12_oshash.up.sql
12_postmigrate.go
13_images.up.sql
14_stash_box_ids.up.sql
15_file_mod_time.up.sql
16_organized_flag.up.sql
17_reset_scene_size.up.sql
18_scene_galleries.up.sql
19_performer_tags.up.sql
20_phash.up.sql
21_performers_studios_details.up.sql
22_performers_studios_rating.up.sql
23_scenes_interactive.up.sql
24_tag_aliases.up.sql
25_saved_filters.up.sql
26_tag_hierarchy.up.sql
27_studio_aliases.up.sql
28_images_indexes.up.sql
29_interactive_speed.up.sql
30_ignore_autotag.up..sql
31_scenes_captions.up.sql
32_files.up.sql
32_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
32_premigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
33_noop.up.sql
34_indexes.up.sql
34_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
35_assoc_tables.up.sql
36_tags_description.up.sql
37_iso_country_names.up.sql
38_scenes_director_code.up.sql
39_performer_height.up.sql
40_newratings.up.sql
41_scene_activity.up.sql
42_performer_disambig_aliases.up.sql
42_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
43_image_date_url.up.sql
44_gallery_chapters.up.sql
45_blobs.up.sql
45_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
46_penis_stats.up.sql
47_scene_urls.up.sql
48_cleanup.up.sql
48_premigrate.go Database connection pool refactor (#5274) 2024-09-20 12:56:26 +10:00
49_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
49_saved_filter_refactor.up.sql
50_image_urls.up.sql
51_gallery_urls.up.sql
52_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
52_zip_folder_data_correct.up.sql
53_gallery_photographer_code.up.sql
54_image_code_details_photographer.up.sql
55_manual_history.up.sql
55_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
56_studio_favorite.up.sql
57_tag_favorite.up.sql
58_config_correct.up.sql
58_postmigrate.go Rename movies to groups in menu items in 65 post-migration (#5247) 2024-09-11 13:39:46 +10:00
59_movie_urls.up.sql
60_default_filter_move.up.sql
60_postmigrate.go Database connection pool refactor (#5274) 2024-09-20 12:56:26 +10:00
61_movie_tags.up.sql
62_performer_urls.up.sql adding exists check before dropping constraints (#5363) 2024-10-15 13:10:47 +11:00
63_studio_tags.up.sql
64_fixes.up.sql
64_postmigrate.go Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
65_movie_group_rename.up.sql
65_postmigrate.go Rename movies to groups in menu items in 65 post-migration (#5247) 2024-09-11 13:39:46 +10:00
66_gallery_cover.up.sql
67_group_relationships.up.sql Containing Group/Sub-Group relationships (#5105) 2024-08-30 11:43:44 +10:00
68_image_studio_index.up.sql Exclude null values from image studio id index (#5335) 2024-10-03 11:53:29 +10:00
69_stash_id_updated_at.up.sql Add updated_at field to stash_id's (#5259) 2024-10-31 15:56:16 +11:00
70_markers_end.up.sql Markers can have end time (#5311) 2024-11-02 11:55:48 +11:00
71_custom_fields.up.sql Performer custom fields (#5487) 2024-12-03 13:49:55 +11:00
72_tag_sort_name.up.sql Add Sort Name to Tags (#5531) 2025-02-11 08:17:21 +11:00
73_studio_urls.up.sql Feature: Support Multiple URLs in Studios (#6223) 2025-11-10 14:34:21 +11:00
74_tag_stash_ids.up.sql Feature: Tag StashID support (#6255) 2025-11-13 14:24:09 +11:00
75_date_precision.up.sql Date precision (#6359) 2025-12-08 09:11:40 +11:00
custom_migration.go
README.md Feature: Support Multiple URLs in Studios (#6223) 2025-11-10 14:34:21 +11:00

Creating a migration

  1. Create new migration file in the migrations directory with the format NN_description.up.sql, where NN is the next sequential number.

  2. Update pkg/sqlite/database.go to update the appSchemaVersion value to the new migration number.

For migrations requiring complex logic or config file changes, see existing custom migrations for examples.