class Migration(migrations.Migration): dependencies = [ ("sites", "0002_alter_domain_unique"), ("api", "0061_no_null_product_on_plantemplate"), ] operations = [ migrations.CreateModel( name="SiteProfile", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("logo", models.ImageField(blank=True, upload_to="")), ( "site", models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to="sites.Site" ), ), ], options={"abstract": False}, bases=(parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name="SiteProfileTranslation", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "language_code", models.CharField( db_index=True, max_length=15, verbose_name="Language" ), ), ("name", models.CharField(max_length=64)), ( "welcome_text", sfdo_template_helpers.fields.MarkdownField( blank=True, property_suffix="_markdown" ), ), ( "copyright_notice", sfdo_template_helpers.fields.MarkdownField( blank=True, property_suffix="_markdown" ), ), ( "master", models.ForeignKey( editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name="translations", to="api.SiteProfile", ), ), ], options={ "verbose_name": "site profile Translation", "db_table": "api_siteprofile_translation", "db_tablespace": "", "managed": True, "default_permissions": (), }, ), migrations.AlterUniqueTogether( name="siteprofiletranslation", unique_together={("language_code", "master")} ), ]
class Migration(migrations.Migration): dependencies = [ ('shuup', '0001_initial'), ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='BasketCampaign', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('name', models.CharField(max_length=120, help_text='The name for this campaign.', verbose_name='name')), ('identifier', shuup.core.fields.InternalIdentifierField(max_length=64, null=True, unique=True, editable=False, blank=True)), ('active', models.BooleanField(verbose_name='active', default=False)), ('start_datetime', models.DateTimeField(blank=True, verbose_name='start date and time', null=True)), ('end_datetime', models.DateTimeField(blank=True, verbose_name='end date and time', null=True)), ('created_on', models.DateTimeField(verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField(verbose_name='modified on', auto_now=True)), ('basket_line_text', models.CharField( max_length=120, help_text='This text will be shown in basket.', verbose_name='basket line text')), ], options={ 'verbose_name': 'Campaign', 'verbose_name_plural': 'Campaigns', 'abstract': False, }, bases=(shuup.utils.properties.MoneyPropped, parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='BasketCampaignTranslation', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('public_name', models.CharField(verbose_name='public name', max_length=120)), ('master', models.ForeignKey(on_delete=models.CASCADE, related_name='translations', to='campaigns.BasketCampaign', null=True, editable=False)), ], options={ 'db_tablespace': '', 'default_permissions': (), 'verbose_name': 'Campaign Translation', 'managed': True, 'db_table': 'campaigns_basketcampaign_translation', }, ), migrations.CreateModel( name='BasketCondition', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('active', models.BooleanField(default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketDiscountEffect', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketLineEffect', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CatalogCampaign', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('name', models.CharField(max_length=120, help_text='The name for this campaign.', verbose_name='name')), ('identifier', shuup.core.fields.InternalIdentifierField(max_length=64, null=True, unique=True, editable=False, blank=True)), ('active', models.BooleanField(verbose_name='active', default=False)), ('start_datetime', models.DateTimeField(blank=True, verbose_name='start date and time', null=True)), ('end_datetime', models.DateTimeField(blank=True, verbose_name='end date and time', null=True)), ('created_on', models.DateTimeField(verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField(verbose_name='modified on', auto_now=True)), ], options={ 'verbose_name': 'Campaign', 'verbose_name_plural': 'Campaigns', 'abstract': False, }, bases=(shuup.utils.properties.MoneyPropped, parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='CatalogCampaignTranslation', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('public_name', models.CharField(max_length=120, blank=True)), ('master', models.ForeignKey(on_delete=models.CASCADE, related_name='translations', to='campaigns.CatalogCampaign', null=True, editable=False)), ], options={ 'db_tablespace': '', 'default_permissions': (), 'verbose_name': 'Campaign Translation', 'managed': True, 'db_table': 'campaigns_catalogcampaign_translation', }, ), migrations.CreateModel( name='CatalogFilter', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('active', models.BooleanField(verbose_name='active', default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='ContactGroupSalesRange', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('min_value', shuup.core.fields.MoneyValueField(blank=True, decimal_places=9, verbose_name='min amount', null=True, max_digits=36)), ('max_value', shuup.core.fields.MoneyValueField(blank=True, decimal_places=9, verbose_name='max amount', null=True, max_digits=36)), ('group', models.ForeignKey(on_delete=models.CASCADE, related_name='+', to='shuup.ContactGroup', verbose_name='group')), ('shop', models.ForeignKey(on_delete=models.CASCADE, related_name='+', to='shuup.Shop', verbose_name='shop')), ], ), migrations.CreateModel( name='ContextCondition', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('active', models.BooleanField(default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Coupon', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('code', models.CharField(max_length=12)), ('usage_limit_customer', models.PositiveIntegerField( blank=True, help_text= 'Limit the amount of usages per a single customer.', verbose_name='usage limit per customer', null=True)), ('usage_limit', models.PositiveIntegerField( blank=True, help_text= 'Set the absolute limit of usages for this coupon. If the limit is zero (0) coupon cannot be used.', verbose_name='usage limit', null=True)), ('active', models.BooleanField(verbose_name='is active', default=False)), ('created_on', models.DateTimeField(verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField(verbose_name='modified on', auto_now=True)), ('created_by', models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='created by')), ('modified_by', models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='modified by')), ], ), migrations.CreateModel( name='CouponUsage', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('created_on', models.DateTimeField(verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField(verbose_name='modified on', auto_now=True)), ('coupon', models.ForeignKey(on_delete=models.CASCADE, related_name='usages', to='campaigns.Coupon')), ('created_by', models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='created by')), ('modified_by', models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='modified by')), ('order', models.ForeignKey(on_delete=models.CASCADE, related_name='coupon_usages', to='shuup.Order')), ], ), migrations.CreateModel( name='ProductDiscountEffect', fields=[ ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketDiscountAmount', fields=[ ('basketdiscounteffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketDiscountEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('discount_amount', shuup.core.fields.MoneyValueField( blank=True, null=True, verbose_name='discount amount', help_text='Flat amount of discount.', decimal_places=9, default=None, max_digits=36)), ], options={ 'abstract': False, }, bases=('campaigns.basketdiscounteffect', ), ), migrations.CreateModel( name='BasketDiscountPercentage', fields=[ ('basketdiscounteffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketDiscountEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('discount_percentage', models.DecimalField( blank=True, null=True, verbose_name='discount percentage', help_text='The discount percentage for this campaign.', decimal_places=5, max_digits=6)), ], options={ 'abstract': False, }, bases=('campaigns.basketdiscounteffect', ), ), migrations.CreateModel( name='BasketMaxTotalAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('amount_value', shuup.core.fields.MoneyValueField( blank=True, null=True, verbose_name='maximum basket total amount', decimal_places=9, default=None, max_digits=36)), ], options={ 'abstract': False, }, bases=(shuup.utils.properties.MoneyPropped, 'campaigns.basketcondition'), ), migrations.CreateModel( name='BasketMaxTotalProductAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('product_count', models.DecimalField( blank=True, decimal_places=9, verbose_name='maximum product count in basket', null=True, max_digits=36)), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='BasketTotalAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('amount_value', shuup.core.fields.MoneyValueField( blank=True, null=True, verbose_name='basket total amount', decimal_places=9, default=None, max_digits=36)), ], options={ 'abstract': False, }, bases=(shuup.utils.properties.MoneyPropped, 'campaigns.basketcondition'), ), migrations.CreateModel( name='BasketTotalProductAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('product_count', models.DecimalField(blank=True, decimal_places=9, verbose_name='product count in basket', null=True, max_digits=36)), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='CategoryFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.CatalogFilter', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('categories', models.ManyToManyField(verbose_name='categories', to='shuup.Category')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.CreateModel( name='ContactBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('contacts', models.ManyToManyField(verbose_name='contacts', to='shuup.Contact')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ContactCondition', fields=[ ('contextcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.ContextCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('contacts', models.ManyToManyField(verbose_name='contacts', to='shuup.Contact')), ], options={ 'abstract': False, }, bases=('campaigns.contextcondition', ), ), migrations.CreateModel( name='ContactGroupBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('contact_groups', models.ManyToManyField(verbose_name='contact groups', to='shuup.ContactGroup')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ContactGroupCondition', fields=[ ('contextcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.ContextCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('contact_groups', models.ManyToManyField(verbose_name='contact groups', to='shuup.ContactGroup')), ], options={ 'abstract': False, }, bases=('campaigns.contextcondition', ), ), migrations.CreateModel( name='DiscountFromProduct', fields=[ ('basketlineeffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketLineEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('per_line_discount', models.BooleanField( verbose_name='per line discount', help_text= 'Uncheck this if you want to give discount for each matched product.', default=True)), ('discount_amount', shuup.core.fields.MoneyValueField( blank=True, null=True, verbose_name='discount amount', help_text='Flat amount of discount.', decimal_places=9, default=None, max_digits=36)), ('products', models.ManyToManyField(verbose_name='product', to='shuup.Product')), ], options={ 'abstract': False, }, bases=('campaigns.basketlineeffect', ), ), migrations.CreateModel( name='FreeProductLine', fields=[ ('basketlineeffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketLineEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('quantity', models.PositiveIntegerField(default=1, verbose_name='quantity')), ('products', models.ManyToManyField(verbose_name='product', to='shuup.Product')), ], options={ 'abstract': False, }, bases=('campaigns.basketlineeffect', ), ), migrations.CreateModel( name='ProductDiscountAmount', fields=[ ('productdiscounteffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.ProductDiscountEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('discount_amount', shuup.core.fields.MoneyValueField( blank=True, null=True, verbose_name='discount amount', help_text='Flat amount of discount.', decimal_places=9, default=None, max_digits=36)), ], options={ 'abstract': False, }, bases=('campaigns.productdiscounteffect', ), ), migrations.CreateModel( name='ProductDiscountPercentage', fields=[ ('productdiscounteffect_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.ProductDiscountEffect', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('discount_percentage', models.DecimalField( blank=True, null=True, verbose_name='discount percentage', help_text='The discount percentage for this campaign.', decimal_places=5, max_digits=6)), ], options={ 'abstract': False, }, bases=('campaigns.productdiscounteffect', ), ), migrations.CreateModel( name='ProductFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.CatalogFilter', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('products', models.ManyToManyField(verbose_name='product', to='shuup.Product')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.CreateModel( name='ProductsInBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.BasketCondition', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('quantity', models.PositiveIntegerField(default=1, verbose_name='quantity')), ('products', models.ManyToManyField(blank=True, verbose_name='products', to='shuup.Product')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ProductTypeFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField(on_delete=models.CASCADE, to='campaigns.CatalogFilter', parent_link=True, serialize=False, auto_created=True, primary_key=True)), ('product_types', models.ManyToManyField(verbose_name='product Types', to='shuup.ProductType')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.AddField( model_name='productdiscounteffect', name='campaign', field=models.ForeignKey(on_delete=models.CASCADE, related_name='effects', to='campaigns.CatalogCampaign', verbose_name='campaign'), ), migrations.AddField( model_name='productdiscounteffect', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.productdiscounteffect_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='contextcondition', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.contextcondition_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='catalogfilter', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.catalogfilter_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='catalogcampaign', name='conditions', field=models.ManyToManyField(blank=True, related_name='campaign', to='campaigns.ContextCondition'), ), migrations.AddField( model_name='catalogcampaign', name='created_by', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='created by'), ), migrations.AddField( model_name='catalogcampaign', name='filters', field=models.ManyToManyField(blank=True, related_name='campaign', to='campaigns.CatalogFilter'), ), migrations.AddField( model_name='catalogcampaign', name='modified_by', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='modified by'), ), migrations.AddField( model_name='catalogcampaign', name='shop', field=models.ForeignKey( on_delete=models.CASCADE, to='shuup.Shop', verbose_name='shop', help_text='The shop where campaign is active.'), ), migrations.AddField( model_name='basketlineeffect', name='campaign', field=models.ForeignKey(on_delete=models.CASCADE, related_name='line_effects', to='campaigns.BasketCampaign', verbose_name='campaign'), ), migrations.AddField( model_name='basketlineeffect', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.basketlineeffect_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='basketdiscounteffect', name='campaign', field=models.ForeignKey(on_delete=models.CASCADE, related_name='discount_effects', to='campaigns.BasketCampaign', verbose_name='campaign'), ), migrations.AddField( model_name='basketdiscounteffect', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.basketdiscounteffect_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='basketcondition', name='polymorphic_ctype', field=models.ForeignKey( on_delete=models.CASCADE, related_name='polymorphic_campaigns.basketcondition_set+', to='contenttypes.ContentType', null=True, editable=False), ), migrations.AddField( model_name='basketcampaign', name='conditions', field=models.ManyToManyField(blank=True, related_name='campaign', to='campaigns.BasketCondition'), ), migrations.AddField( model_name='basketcampaign', name='coupon', field=models.OneToOneField(on_delete=models.CASCADE, verbose_name='coupon', blank=True, related_name='campaign', to='campaigns.Coupon', null=True), ), migrations.AddField( model_name='basketcampaign', name='created_by', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='created by'), ), migrations.AddField( model_name='basketcampaign', name='modified_by', field=models.ForeignKey( blank=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, null=True, verbose_name='modified by'), ), migrations.AddField( model_name='basketcampaign', name='shop', field=models.ForeignKey( on_delete=models.CASCADE, to='shuup.Shop', verbose_name='shop', help_text='The shop where campaign is active.'), ), migrations.AlterUniqueTogether( name='contactgroupsalesrange', unique_together=set([('group', 'shop')]), ), migrations.AlterUniqueTogether( name='catalogcampaigntranslation', unique_together=set([('language_code', 'master')]), ), migrations.AlterUniqueTogether( name='basketcampaigntranslation', unique_together=set([('language_code', 'master')]), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('oidc_provider', '0020_client__post_logout_redirect_uris'), ] operations = [ migrations.CreateModel( name='Api', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField( max_length=50, validators=[ django.core.validators.RegexValidator( '^[a-z0-9]*$', message=('May contain only lower case letters ' 'and digits.')) ], verbose_name='name')), ('required_scopes', multiselectfield.db.fields.MultiSelectField( blank=True, choices=[('email', 'E-mail'), ('profile', 'Profile'), ('address', 'Address'), ('github_username', 'GitHub username')], help_text=('Select the scopes that this API needs ' 'information from. Information from the ' 'selected scopes will be included to the ' 'API Tokens.'), max_length=1000, verbose_name='required scopes')), ], options={ 'verbose_name': 'API', 'verbose_name_plural': 'APIs', }, ), migrations.CreateModel( name='ApiDomain', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('identifier', models.CharField(help_text=( 'API domain identifier, e.g. https://api.hel.fi/auth'), max_length=50, unique=True, verbose_name='identifier')), ], options={ 'verbose_name': 'API domain', 'verbose_name_plural': 'API domains', }, ), migrations.CreateModel( name='ApiScope', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('identifier', models.CharField( editable=False, help_text= ('The scope identifier as known by the API application ' '(i.e. the Resource Server). Generated automatically ' 'from the API identifier and the scope specifier.'), max_length=150, unique=True, verbose_name='identifier')), ('specifier', models.CharField( blank=True, help_text=( 'If there is a need for multiple scopes per API, ' 'this can specify what kind of scope this is about, ' 'e.g. "readonly". For general API scope just leave ' 'this empty.'), max_length=30, validators=[ django.core.validators.RegexValidator( '^[a-z0-9]*$', message=('May contain only lower case letters ' 'and digits.')) ], verbose_name='specifier')), ('allowed_apps', models.ManyToManyField(help_text=( 'Select client applications which are allowed to ' 'get access to this API scope.'), related_name='granted_api_scopes', to='oidc_provider.Client', verbose_name='allowed applications')), ('api', models.ForeignKey(help_text='The API that this scope is for.', on_delete=django.db.models.deletion.CASCADE, related_name='scopes', to='oidc_apis.Api', verbose_name='API')), ], options={ 'verbose_name': 'API scope', 'verbose_name_plural': 'API scopes', }, bases=(AutoFilledIdentifier, ImmutableFields, parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='ApiScopeTranslation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('name', models.CharField(max_length=200, verbose_name='name')), ('description', models.CharField(max_length=1000, verbose_name='description')), ('master', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='oidc_apis.ApiScope', verbose_name='API scope')), ], options={ 'verbose_name': 'API scope translation', 'verbose_name_plural': 'API scope translations', }, ), migrations.AddField( model_name='api', name='domain', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='oidc_apis.ApiDomain', verbose_name='domain'), ), migrations.AddField( model_name='api', name='oidc_client', field=models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name='+', to='oidc_provider.Client', verbose_name='OIDC client'), ), migrations.AlterUniqueTogether( name='apiscopetranslation', unique_together=set([('language_code', 'master')]), ), migrations.AlterUniqueTogether( name='apiscope', unique_together=set([('api', 'specifier')]), ), migrations.AlterUniqueTogether( name='api', unique_together=set([('domain', 'name')]), ), ]
class Migration(migrations.Migration): replaces = [ ('campaigns', '0001_initial'), ('campaigns', '0002_productsinbasketcondition_operator'), ('campaigns', '0003_category_products'), ('campaigns', '0004_logmodels'), ('campaigns', '0005_catalogfiltercachedshopproduct'), ('campaigns', '0006_basket_cond_category_to_categories'), ('campaigns', '0007_add_excluded_categories'), ('campaigns', '0008_freeproductline_quantity_to_quantityfield'), ('campaigns', '0009_hourcondition'), ('campaigns', '0010_hourbasketcondition'), ('campaigns', '0011_alter_names'), ] dependencies = [ ('wshop', '0001_squashed_0039_alter_names'), ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='BasketCampaign', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('name', models.CharField( help_text='The name for this campaign.', max_length=120, verbose_name='name')), ('identifier', wshop.core.fields.InternalIdentifierField( editable=False, blank=True, max_length=64, null=True, unique=True)), ('active', models.BooleanField( help_text= 'Check this if the campaign is currently active. Please also set a start and end date.', verbose_name='active', default=False)), ('start_datetime', models.DateTimeField( blank=True, help_text= 'The date and time the campaign starts. This is only applicable if the campaign is marked as active.', null=True, verbose_name='start date and time')), ('end_datetime', models.DateTimeField( blank=True, help_text= 'The date and time the campaign ends. This is only applicable if the campaign is marked as active.', null=True, verbose_name='end date and time')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField( auto_now=True, verbose_name='modified on')), ('basket_line_text', models.CharField( help_text='This text will be shown in basket.', max_length=120, verbose_name='basket line text')), ], options={ 'abstract': False, 'verbose_name_plural': 'Campaigns', 'verbose_name': 'Campaign', }, bases=(wshop.utils.properties.MoneyPropped, parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='BasketCampaignLogEntry', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('message', models.CharField( max_length=256, verbose_name='message')), ('identifier', models.CharField( blank=True, max_length=64, verbose_name='identifier')), ('kind', enumfields.fields.EnumIntegerField( enum=wshop.utils.analog.LogEntryKind, verbose_name='log entry kind', default=0)), ('extra', jsonfield.fields.JSONField( blank=True, null=True, verbose_name='extra data')), ('target', models.ForeignKey( to='campaigns.BasketCampaign', related_name='log_entries', verbose_name='target')), ('user', models.ForeignKey( to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT, null=True, verbose_name='user')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketCampaignTranslation', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('language_code', models.CharField( max_length=15, db_index=True, verbose_name='Language')), ('public_name', models.CharField( help_text='The campaign name to show in the store front.', max_length=120, verbose_name='public name')), ('master', models.ForeignKey( to='campaigns.BasketCampaign', editable=False, related_name='translations', null=True)), ], options={ 'managed': True, 'db_table': 'campaigns_basketcampaign_translation', 'default_permissions': (), 'db_tablespace': '', 'verbose_name': 'Campaign Translation', }, ), migrations.CreateModel( name='BasketCondition', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('active', models.BooleanField(default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketDiscountEffect', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketLineEffect', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CatalogCampaign', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('name', models.CharField( help_text='The name for this campaign.', max_length=120, verbose_name='name')), ('identifier', wshop.core.fields.InternalIdentifierField( editable=False, blank=True, max_length=64, null=True, unique=True)), ('active', models.BooleanField( help_text= 'Check this if the campaign is currently active. Please also set a start and end date.', verbose_name='active', default=False)), ('start_datetime', models.DateTimeField( blank=True, help_text= 'The date and time the campaign starts. This is only applicable if the campaign is marked as active.', null=True, verbose_name='start date and time')), ('end_datetime', models.DateTimeField( blank=True, help_text= 'The date and time the campaign ends. This is only applicable if the campaign is marked as active.', null=True, verbose_name='end date and time')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField( auto_now=True, verbose_name='modified on')), ], options={ 'abstract': False, 'verbose_name_plural': 'Campaigns', 'verbose_name': 'Campaign', }, bases=(wshop.utils.properties.MoneyPropped, parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='CatalogCampaignLogEntry', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('message', models.CharField( max_length=256, verbose_name='message')), ('identifier', models.CharField( blank=True, max_length=64, verbose_name='identifier')), ('kind', enumfields.fields.EnumIntegerField( enum=wshop.utils.analog.LogEntryKind, verbose_name='log entry kind', default=0)), ('extra', jsonfield.fields.JSONField( blank=True, null=True, verbose_name='extra data')), ('target', models.ForeignKey( to='campaigns.CatalogCampaign', related_name='log_entries', verbose_name='target')), ('user', models.ForeignKey( to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT, null=True, verbose_name='user')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CatalogCampaignTranslation', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('language_code', models.CharField( max_length=15, db_index=True, verbose_name='Language')), ('public_name', models.CharField( blank=True, help_text='The campaign name to show in the store front.', max_length=120)), ('master', models.ForeignKey( to='campaigns.CatalogCampaign', editable=False, related_name='translations', null=True)), ], options={ 'managed': True, 'db_table': 'campaigns_catalogcampaign_translation', 'default_permissions': (), 'db_tablespace': '', 'verbose_name': 'Campaign Translation', }, ), migrations.CreateModel( name='CatalogFilter', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('active', models.BooleanField( verbose_name='active', default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CatalogFilterCachedShopProduct', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ], ), migrations.CreateModel( name='ContactGroupSalesRange', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('min_value', wshop.core.fields.MoneyValueField( blank=True, decimal_places=9, null=True, max_digits=36, verbose_name='min amount')), ('max_value', wshop.core.fields.MoneyValueField( blank=True, decimal_places=9, null=True, max_digits=36, verbose_name='max amount')), ('group', models.ForeignKey( to='wshop.ContactGroup', related_name='+', verbose_name='group')), ('shop', models.ForeignKey( to='wshop.Shop', related_name='+', verbose_name='shop')), ], ), migrations.CreateModel( name='ContextCondition', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('active', models.BooleanField(default=True)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Coupon', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('code', models.CharField(max_length=12)), ('usage_limit_customer', models.PositiveIntegerField( blank=True, help_text= 'Limit the amount of usages per a single customer.', null=True, verbose_name='usage limit per customer')), ('usage_limit', models.PositiveIntegerField( blank=True, help_text= 'Set the absolute limit of usages for this coupon. If the limit is zero (0) coupon cannot be used.', null=True, verbose_name='usage limit')), ('active', models.BooleanField( verbose_name='is active', default=False)), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField( auto_now=True, verbose_name='modified on')), ('created_by', models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='created by', related_name='+')), ('modified_by', models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='modified by', related_name='+')), ], ), migrations.CreateModel( name='CouponLogEntry', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('message', models.CharField( max_length=256, verbose_name='message')), ('identifier', models.CharField( blank=True, max_length=64, verbose_name='identifier')), ('kind', enumfields.fields.EnumIntegerField( enum=wshop.utils.analog.LogEntryKind, verbose_name='log entry kind', default=0)), ('extra', jsonfield.fields.JSONField( blank=True, null=True, verbose_name='extra data')), ('target', models.ForeignKey( to='campaigns.Coupon', related_name='log_entries', verbose_name='target')), ('user', models.ForeignKey( to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT, null=True, verbose_name='user')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='CouponUsage', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('modified_on', models.DateTimeField( auto_now=True, verbose_name='modified on')), ('coupon', models.ForeignKey( to='campaigns.Coupon', related_name='usages')), ('created_by', models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='created by', related_name='+')), ('modified_by', models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='modified by', related_name='+')), ('order', models.ForeignKey( to='wshop.Order', related_name='coupon_usages')), ], ), migrations.CreateModel( name='CouponUsageLogEntry', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ('created_on', models.DateTimeField( verbose_name='created on', auto_now_add=True)), ('message', models.CharField( max_length=256, verbose_name='message')), ('identifier', models.CharField( blank=True, max_length=64, verbose_name='identifier')), ('kind', enumfields.fields.EnumIntegerField( enum=wshop.utils.analog.LogEntryKind, verbose_name='log entry kind', default=0)), ('extra', jsonfield.fields.JSONField( blank=True, null=True, verbose_name='extra data')), ('target', models.ForeignKey( to='campaigns.CouponUsage', related_name='log_entries', verbose_name='target')), ('user', models.ForeignKey( to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT, null=True, verbose_name='user')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='ProductDiscountEffect', fields=[ ('id', models.AutoField( auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='BasketDiscountAmount', fields=[ ('basketdiscounteffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketDiscountEffect')), ('discount_amount', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, help_text='Flat amount of discount.', null=True, verbose_name='discount amount', default=None)), ], options={ 'abstract': False, }, bases=('campaigns.basketdiscounteffect', ), ), migrations.CreateModel( name='BasketDiscountPercentage', fields=[ ('basketdiscounteffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketDiscountEffect')), ('discount_percentage', models.DecimalField( decimal_places=5, max_digits=6, blank=True, help_text='The discount percentage for this campaign.', null=True, verbose_name='discount percentage')), ], options={ 'abstract': False, }, bases=('campaigns.basketdiscounteffect', ), ), migrations.CreateModel( name='BasketMaxTotalAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('amount_value', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, null=True, verbose_name='maximum basket total amount', default=None)), ], options={ 'abstract': False, }, bases=(wshop.utils.properties.MoneyPropped, 'campaigns.basketcondition'), ), migrations.CreateModel( name='BasketMaxTotalProductAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('product_count', models.DecimalField( blank=True, decimal_places=9, null=True, max_digits=36, verbose_name='maximum product count in basket')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='BasketTotalAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('amount_value', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, null=True, verbose_name='basket total amount', default=None)), ], options={ 'abstract': False, }, bases=(wshop.utils.properties.MoneyPropped, 'campaigns.basketcondition'), ), migrations.CreateModel( name='BasketTotalProductAmountCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('product_count', models.DecimalField( blank=True, decimal_places=9, null=True, max_digits=36, verbose_name='product count in basket')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='CategoryFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.CatalogFilter')), ('categories', models.ManyToManyField( to='wshop.Category', verbose_name='categories')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.CreateModel( name='CategoryProductsBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('operator', enumfields.fields.EnumIntegerField( enum=wshop.campaigns.models.basket_conditions. ComparisonOperator, verbose_name='operator', default=1)), ('quantity', models.PositiveIntegerField( verbose_name='quantity', default=1)), ('categories', models.ManyToManyField( to='wshop.Category', verbose_name='categories', related_name= '_categoryproductsbasketcondition_categories_+')), ('excluded_categories', models.ManyToManyField( blank=True, help_text= "If the customer has even a single product in the basket from these categories this rule won't match thus the campaign cannot be applied to the basket.", to='wshop.Category', verbose_name='excluded categories', related_name= '_categoryproductsbasketcondition_excluded_categories_+')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ContactBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('contacts', models.ManyToManyField( to='wshop.Contact', verbose_name='contacts')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ContactCondition', fields=[ ('contextcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.ContextCondition')), ('contacts', models.ManyToManyField( to='wshop.Contact', verbose_name='contacts')), ], options={ 'abstract': False, }, bases=('campaigns.contextcondition', ), ), migrations.CreateModel( name='ContactGroupBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('contact_groups', models.ManyToManyField( to='wshop.ContactGroup', verbose_name='contact groups')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ContactGroupCondition', fields=[ ('contextcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.ContextCondition')), ('contact_groups', models.ManyToManyField( to='wshop.ContactGroup', verbose_name='contact groups')), ], options={ 'abstract': False, }, bases=('campaigns.contextcondition', ), ), migrations.CreateModel( name='DiscountFromCategoryProducts', fields=[ ('basketlineeffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketLineEffect')), ('discount_amount', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, help_text='Flat amount of discount.', null=True, verbose_name='discount amount', default=None)), ('discount_percentage', models.DecimalField( decimal_places=5, max_digits=6, blank=True, help_text='The discount percentage for this campaign.', null=True, verbose_name='discount percentage')), ('category', models.ForeignKey( to='wshop.Category', verbose_name='category')), ], options={ 'abstract': False, }, bases=('campaigns.basketlineeffect', ), ), migrations.CreateModel( name='DiscountFromProduct', fields=[ ('basketlineeffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketLineEffect')), ('per_line_discount', models.BooleanField( help_text= 'Uncheck this if you want to give discount for each matched product.', verbose_name='per line discount', default=True)), ('discount_amount', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, help_text='Flat amount of discount.', null=True, verbose_name='discount amount', default=None)), ('products', models.ManyToManyField( to='wshop.Product', verbose_name='product')), ], options={ 'abstract': False, }, bases=('campaigns.basketlineeffect', ), ), migrations.CreateModel( name='FreeProductLine', fields=[ ('basketlineeffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketLineEffect')), ('quantity', wshop.core.fields.QuantityField( decimal_places=9, max_digits=36, verbose_name='quantity', default=1)), ('products', models.ManyToManyField( to='wshop.Product', verbose_name='product')), ], options={ 'abstract': False, }, bases=('campaigns.basketlineeffect', ), ), migrations.CreateModel( name='HourBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('hour_start', models.TimeField( help_text='12pm is considered noon and 12am as midnight.', verbose_name='start time')), ('hour_end', models.TimeField( help_text= '12pm is considered noon and 12am as midnight. End time is not considered match.', verbose_name='end time')), ('days', models.CharField( max_length=255, verbose_name='days', validators=[ django.core.validators.RegexValidator( re.compile('^[\\d,]+\\Z', 32), 'Enter only digits separated by commas.', 'invalid') ])), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='HourCondition', fields=[ ('contextcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.ContextCondition')), ('hour_start', models.TimeField( help_text='12pm is considered noon and 12am as midnight.', verbose_name='start time')), ('hour_end', models.TimeField( help_text= '12pm is considered noon and 12am as midnight. End time is not considered match.', verbose_name='end time')), ('days', models.CharField( max_length=255, verbose_name='days', validators=[ django.core.validators.RegexValidator( re.compile('^[\\d,]+\\Z', 32), 'Enter only digits separated by commas.', 'invalid') ])), ], options={ 'abstract': False, }, bases=('campaigns.contextcondition', ), ), migrations.CreateModel( name='ProductDiscountAmount', fields=[ ('productdiscounteffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.ProductDiscountEffect')), ('discount_amount', wshop.core.fields.MoneyValueField( decimal_places=9, max_digits=36, blank=True, help_text='Flat amount of discount.', null=True, verbose_name='discount amount', default=None)), ], options={ 'abstract': False, }, bases=('campaigns.productdiscounteffect', ), ), migrations.CreateModel( name='ProductDiscountPercentage', fields=[ ('productdiscounteffect_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.ProductDiscountEffect')), ('discount_percentage', models.DecimalField( decimal_places=5, max_digits=6, blank=True, help_text='The discount percentage for this campaign.', null=True, verbose_name='discount percentage')), ], options={ 'abstract': False, }, bases=('campaigns.productdiscounteffect', ), ), migrations.CreateModel( name='ProductFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.CatalogFilter')), ('products', models.ManyToManyField( to='wshop.Product', verbose_name='product')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.CreateModel( name='ProductsInBasketCondition', fields=[ ('basketcondition_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.BasketCondition')), ('operator', enumfields.fields.EnumIntegerField( enum=wshop.campaigns.models.basket_conditions. ComparisonOperator, verbose_name='operator', default=1)), ('quantity', models.PositiveIntegerField( verbose_name='quantity', default=1)), ('products', models.ManyToManyField( blank=True, to='wshop.Product', verbose_name='products')), ], options={ 'abstract': False, }, bases=('campaigns.basketcondition', ), ), migrations.CreateModel( name='ProductTypeFilter', fields=[ ('catalogfilter_ptr', models.OneToOneField( auto_created=True, primary_key=True, parent_link=True, serialize=False, to='campaigns.CatalogFilter')), ('product_types', models.ManyToManyField( to='wshop.ProductType', verbose_name='product Types')), ], options={ 'abstract': False, }, bases=('campaigns.catalogfilter', ), ), migrations.AddField( model_name='productdiscounteffect', name='campaign', field=models.ForeignKey( to='campaigns.CatalogCampaign', related_name='effects', verbose_name='campaign'), ), migrations.AddField( model_name='productdiscounteffect', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name= 'polymorphic_campaigns.productdiscounteffect_set+', null=True), ), migrations.AddField( model_name='contextcondition', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name='polymorphic_campaigns.contextcondition_set+', null=True), ), migrations.AddField( model_name='catalogfiltercachedshopproduct', name='filter', field=models.ForeignKey( to='campaigns.CatalogFilter', related_name='cached_shop_products'), ), migrations.AddField( model_name='catalogfiltercachedshopproduct', name='shop_product', field=models.ForeignKey( to='wshop.ShopProduct', related_name='cached_catalog_campaign_filters'), ), migrations.AddField( model_name='catalogfilter', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name='polymorphic_campaigns.catalogfilter_set+', null=True), ), migrations.AddField( model_name='catalogcampaign', name='conditions', field=models.ManyToManyField( blank=True, to='campaigns.ContextCondition', related_name='campaign'), ), migrations.AddField( model_name='catalogcampaign', name='created_by', field=models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='created by', related_name='+'), ), migrations.AddField( model_name='catalogcampaign', name='filters', field=models.ManyToManyField( blank=True, to='campaigns.CatalogFilter', related_name='campaign'), ), migrations.AddField( model_name='catalogcampaign', name='modified_by', field=models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='modified by', related_name='+'), ), migrations.AddField( model_name='catalogcampaign', name='shop', field=models.ForeignKey( help_text='The shop where the campaign is active.', to='wshop.Shop', verbose_name='shop'), ), migrations.AddField( model_name='basketlineeffect', name='campaign', field=models.ForeignKey( to='campaigns.BasketCampaign', related_name='line_effects', verbose_name='campaign'), ), migrations.AddField( model_name='basketlineeffect', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name='polymorphic_campaigns.basketlineeffect_set+', null=True), ), migrations.AddField( model_name='basketdiscounteffect', name='campaign', field=models.ForeignKey( to='campaigns.BasketCampaign', related_name='discount_effects', verbose_name='campaign'), ), migrations.AddField( model_name='basketdiscounteffect', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name='polymorphic_campaigns.basketdiscounteffect_set+', null=True), ), migrations.AddField( model_name='basketcondition', name='polymorphic_ctype', field=models.ForeignKey( to='contenttypes.ContentType', editable=False, related_name='polymorphic_campaigns.basketcondition_set+', null=True), ), migrations.AddField( model_name='basketcampaign', name='conditions', field=models.ManyToManyField( blank=True, to='campaigns.BasketCondition', related_name='campaign'), ), migrations.AddField( model_name='basketcampaign', name='coupon', field=models.OneToOneField( blank=True, to='campaigns.Coupon', null=True, verbose_name='coupon', related_name='campaign'), ), migrations.AddField( model_name='basketcampaign', name='created_by', field=models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='created by', related_name='+'), ), migrations.AddField( model_name='basketcampaign', name='modified_by', field=models.ForeignKey( to=settings.AUTH_USER_MODEL, blank=True, on_delete=django.db.models.deletion.SET_NULL, null=True, verbose_name='modified by', related_name='+'), ), migrations.AddField( model_name='basketcampaign', name='shop', field=models.ForeignKey( help_text='The shop where the campaign is active.', to='wshop.Shop', verbose_name='shop'), ), migrations.AlterUniqueTogether( name='contactgroupsalesrange', unique_together=set([('group', 'shop')]), ), migrations.AlterUniqueTogether( name='catalogcampaigntranslation', unique_together=set([('language_code', 'master')]), ), migrations.AlterUniqueTogether( name='basketcampaigntranslation', unique_together=set([('language_code', 'master')]), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('shuup_simple_cms', '0007_gdpr'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('shuup', '0044_add_media'), ] operations = [ migrations.CreateModel( name='GDPRCookieCategory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('always_active', models.BooleanField(default=False, verbose_name='always active')), ('cookies', models.TextField( help_text= 'Comma separated list of cookies names, prefix or suffix that will be included in this category, e.g. _ga, mysession, user_c_', verbose_name='cookies used')), ('shop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='gdpr_cookie_categories', to='shuup.Shop')), ], options={ 'verbose_name': 'gdpr cookie category', 'verbose_name_plural': 'gdpr cookie categories', }, bases=(parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='GDPRCookieCategoryTranslation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('name', models.CharField(max_length=64, verbose_name='name')), ('how_is_used', models.TextField( blank=True, help_text= 'Describe the purpose of this category of cookies and how it is used.', verbose_name='how we use')), ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='shuup_gdpr.GDPRCookieCategory')), ], options={ 'db_tablespace': '', 'default_permissions': (), 'verbose_name': 'gdpr cookie category Translation', 'managed': True, 'db_table': 'shuup_gdpr_gdprcookiecategory_translation', }, ), migrations.CreateModel( name='GDPRSettings', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('enabled', models.BooleanField(default=False, help_text='Define if the GDPR is active.', verbose_name='enabled')), ('shop', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name='gdpr_settings', to='shuup.Shop')), ], options={ 'verbose_name': 'gdpr settings', 'verbose_name_plural': 'gdpr settings', }, bases=(parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='GDPRSettingsTranslation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('cookie_banner_content', models.TextField( blank=True, help_text= 'The text to be presented to users in a pop-up warning.', verbose_name='cookie banner content')), ('cookie_privacy_excerpt', models.TextField( blank=True, help_text= 'The summary text to be presented about cookie privacy.', verbose_name='cookie privacy excerpt')), ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='shuup_gdpr.GDPRSettings')), ], options={ 'db_tablespace': '', 'default_permissions': (), 'verbose_name': 'gdpr settings Translation', 'managed': True, 'db_table': 'shuup_gdpr_gdprsettings_translation', }, ), migrations.CreateModel( name='GDPRUserConsent', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created_on', models.DateTimeField(auto_now_add=True, verbose_name='created on', db_index=True)), ('documents', models.ManyToManyField(blank=True, editable=False, to='shuup_simple_cms.Page', verbose_name='consent documents')), ('shop', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='gdpr_consents', to='shuup.Shop')), ('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='gdpr_consents', to=settings.AUTH_USER_MODEL)), ], options={ 'verbose_name': 'gdpr user consent', 'verbose_name_plural': 'gdpr user consents', }, ), migrations.AlterUniqueTogether( name='gdprsettingstranslation', unique_together=set([('language_code', 'master')]), ), migrations.AlterUniqueTogether( name='gdprcookiecategorytranslation', unique_together=set([('language_code', 'master')]), ), ]
class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ('shuup_simple_cms', '0010_add_render_title_and_template_name'), ] operations = [ migrations.CreateModel( name='PageOpenGraph', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('og_type', enumfields.fields.EnumField( default='website', enum=shuup.simple_cms.models.PageOpenGraphType, max_length=10, verbose_name='type')), ('image', filer.fields.image.FilerImageField( blank=True, help_text='The image of your object.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blog_meta_image', to=settings.FILER_IMAGE_MODEL, verbose_name='Image')), ], options={ 'abstract': False, }, bases=(parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name='PageOpenGraphTranslation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')), ('title', models.CharField( blank=True, help_text= 'The title of your object as it should appear within the graph, e.g. The Rock.', max_length=100, verbose_name='Title')), ('description', models.TextField( blank=True, help_text= 'A one to two sentence description of your object.', max_length=160, verbose_name='Description')), ('section', models.CharField( blank=True, help_text= 'A high-level section name, e.g. Technology. Only applicable when type is Article.', max_length=256, verbose_name='Section')), ('tags', models.CharField( blank=True, help_text= 'Tag words associated with this article. Only applicable when type is Article.', max_length=256, verbose_name='Tags')), ('article_author', models.CharField( blank=True, help_text= 'The name of the author for the article. Only applicable when type is Article.', max_length=100, verbose_name='Article author')), ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='shuup_simple_cms.PageOpenGraph')), ], options={ 'verbose_name': 'page open graph Translation', 'db_table': 'shuup_simple_cms_pageopengraph_translation', 'db_tablespace': '', 'managed': True, 'default_permissions': (), }, ), migrations.AlterField( model_name='page', name='available_from', field=models.DateTimeField( blank=True, db_index=True, help_text= 'Set an available from date to restrict the page to be available only after a certain date and time. This is useful for pages describing sales campaigns or other time-sensitive pages.', null=True, verbose_name='available from'), ), migrations.AlterField( model_name='page', name='available_to', field=models.DateTimeField( blank=True, db_index=True, help_text= 'Set an available to date to restrict the page to be available only after a certain date and time. This is useful for pages describing sales campaigns or other time-sensitive pages.', null=True, verbose_name='available to'), ), migrations.AddField( model_name='pageopengraph', name='page', field=models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name='open_graph', to='shuup_simple_cms.Page', verbose_name='page'), ), migrations.AlterUniqueTogether( name='pageopengraphtranslation', unique_together=set([('language_code', 'master')]), ), ]
class Migration(migrations.Migration): dependencies = [ ("sites", "0002_alter_domain_unique"), ("api", "0064_user_agreed_to_tos_at"), ] operations = [ migrations.CreateModel( name="SiteProfile", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "site", models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to="sites.Site"), ), ], options={"abstract": False}, bases=(parler.models.TranslatableModelMixin, models.Model), ), migrations.CreateModel( name="SiteProfileTranslation", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "language_code", models.CharField(db_index=True, max_length=15, verbose_name="Language"), ), ("name", models.CharField(max_length=64)), ( "clickthrough_agreement", sfdo_template_helpers.fields.markdown.MarkdownField( blank=True, property_suffix="_markdown"), ), ( "master", parler.fields.TranslationsForeignKey( editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name="translations", to="api.SiteProfile", ), ), ], options={ "verbose_name": "site profile Translation", "db_table": "api_siteprofile_translation", "db_tablespace": "", "managed": True, "default_permissions": (), "unique_together": {("language_code", "master")}, }, bases=(parler.models.TranslatedFieldsModelMixin, models.Model), ), ]