Coverage for apps / ai / migrations / 0006_add_ai_discovery_suggestion.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 00:40 +0000

1# Generated by Django 5.2.10 on 2026-01-09 08:19 

2 

3import django.db.models.deletion 

4from django.db import migrations, models 

5 

6 

7class Migration(migrations.Migration): 

8 

9 dependencies = [ 

10 ('ai', '0005_update_serving_adjustment_v2'), 

11 ('profiles', '0001_initial'), 

12 ] 

13 

14 operations = [ 

15 migrations.AlterField( 

16 model_name='aiprompt', 

17 name='prompt_type', 

18 field=models.CharField(choices=[('recipe_remix', 'Recipe Remix'), ('serving_adjustment', 'Serving Adjustment'), ('tips_generation', 'Tips Generation'), ('nutrition_estimate', 'Nutrition Estimate'), ('discover_favorites', 'Discover from Favorites'), ('discover_seasonal', 'Discover Seasonal/Holiday'), ('discover_new', 'Discover Try Something New'), ('search_ranking', 'Search Result Ranking'), ('timer_naming', 'Timer Naming'), ('remix_suggestions', 'Remix Suggestions'), ('selector_repair', 'CSS Selector Repair')], help_text='Unique identifier for this prompt type', max_length=50, unique=True), 

19 ), 

20 migrations.CreateModel( 

21 name='AIDiscoverySuggestion', 

22 fields=[ 

23 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

24 ('suggestion_type', models.CharField(choices=[('favorites', 'Based on Favorites'), ('seasonal', 'Seasonal/Holiday'), ('new', 'Try Something New')], help_text='Type of discovery suggestion', max_length=50)), 

25 ('search_query', models.CharField(help_text='Search query to execute for this suggestion', max_length=255)), 

26 ('title', models.CharField(help_text='Display title for this suggestion', max_length=255)), 

27 ('description', models.TextField(help_text='Explanation of why this suggestion fits the user')), 

28 ('created_at', models.DateTimeField(auto_now_add=True)), 

29 ('profile', models.ForeignKey(help_text='Profile this suggestion belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='ai_discovery_suggestions', to='profiles.profile')), 

30 ], 

31 options={ 

32 'verbose_name': 'AI Discovery Suggestion', 

33 'verbose_name_plural': 'AI Discovery Suggestions', 

34 'ordering': ['-created_at'], 

35 'indexes': [models.Index(fields=['profile', 'suggestion_type', 'created_at'], name='ai_aidiscov_profile_8129f7_idx')], 

36 }, 

37 ), 

38 ] 

← Back to Dashboard