Files
CyberPanel/webmail/migrations/0001_initial.py
master3395 3e8750ab58 webmail: v2.5.5-dev UI and backend improvements
- Resizable folder sidebar with persisted width; nested folder tree with expand/collapse
- Message search: scope all folders or single folder; listMessages honors UID filter
- Drag-and-drop messages onto folders to move (multi-select supported)
- SnappyMail import paths, folder settings store, wm DB migration and SQL install
- IMAP quoted mailbox, IPv4 SMTP relay, compose recipient handling
- Modal new/delete folder flows; dash-free UI copy; folder pills in search results
2026-03-25 23:18:54 +01:00

106 lines
5.2 KiB
Python

# Generated by Django 4.2.14 on 2026-03-25 21:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('owner_email', models.CharField(db_index=True, max_length=200)),
('display_name', models.CharField(blank=True, default='', max_length=200)),
('email_address', models.CharField(max_length=200)),
('phone', models.CharField(blank=True, default='', max_length=50)),
('organization', models.CharField(blank=True, default='', max_length=200)),
('notes', models.TextField(blank=True, default='')),
('is_auto_collected', models.BooleanField(default=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
],
options={
'db_table': 'wm_contacts',
'unique_together': {('owner_email', 'email_address')},
},
),
migrations.CreateModel(
name='ContactGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('owner_email', models.CharField(db_index=True, max_length=200)),
('name', models.CharField(max_length=100)),
],
options={
'db_table': 'wm_contact_groups',
'unique_together': {('owner_email', 'name')},
},
),
migrations.CreateModel(
name='SieveRule',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email_account', models.CharField(db_index=True, max_length=200)),
('name', models.CharField(max_length=200)),
('priority', models.IntegerField(default=0)),
('is_active', models.BooleanField(default=True)),
('condition_field', models.CharField(choices=[('from', 'From'), ('to', 'To'), ('subject', 'Subject'), ('size', 'Size')], max_length=50)),
('condition_type', models.CharField(choices=[('contains', 'Contains'), ('is', 'Is'), ('matches', 'Matches'), ('greater_than', 'Greater than')], max_length=50)),
('condition_value', models.CharField(max_length=500)),
('action_type', models.CharField(choices=[('move', 'Move to folder'), ('forward', 'Forward to'), ('discard', 'Discard'), ('flag', 'Flag')], max_length=50)),
('action_value', models.CharField(blank=True, default='', max_length=500)),
('sieve_script', models.TextField(blank=True, default='')),
],
options={
'db_table': 'wm_sieve_rules',
'ordering': ['priority'],
},
),
migrations.CreateModel(
name='WebmailSession',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('session_key', models.CharField(max_length=64, unique=True)),
('email_account', models.CharField(max_length=200)),
('created_at', models.DateTimeField(auto_now_add=True)),
('last_active', models.DateTimeField(auto_now=True)),
],
options={
'db_table': 'wm_sessions',
},
),
migrations.CreateModel(
name='WebmailSettings',
fields=[
('email_account', models.CharField(max_length=200, primary_key=True, serialize=False)),
('display_name', models.CharField(blank=True, default='', max_length=200)),
('signature_html', models.TextField(blank=True, default='')),
('messages_per_page', models.IntegerField(default=25)),
('default_reply_behavior', models.CharField(choices=[('reply', 'Reply'), ('reply_all', 'Reply All')], default='reply', max_length=20)),
('theme_preference', models.CharField(choices=[('light', 'Light'), ('dark', 'Dark'), ('auto', 'Auto')], default='auto', max_length=20)),
('auto_collect_contacts', models.BooleanField(default=True)),
],
options={
'db_table': 'wm_settings',
},
),
migrations.CreateModel(
name='ContactGroupMembership',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webmail.contact')),
('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webmail.contactgroup')),
],
options={
'db_table': 'wm_contact_group_members',
'unique_together': {('contact', 'group')},
},
),
]