Piki is a minimal wiki
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0001_initial.py 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Generated by Django 5.1.2 on 2024-10-21 04:20
  2. import django.db.models.deletion
  3. import simple_history.models
  4. from django.conf import settings
  5. from django.db import migrations, models
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. ('auth', '0012_alter_user_first_name_max_length'),
  10. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name='HistoricalPikiPage',
  15. fields=[
  16. ('id', models.BigIntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
  17. ('rel_path', models.CharField(db_index=True, max_length=1000)),
  18. ('page_txt', models.TextField(max_length=50000)),
  19. ('tags', models.CharField(blank=True, max_length=1000, null=True)),
  20. ('deleted', models.BooleanField(default=False)),
  21. ('creation_time', models.DateTimeField(blank=True, null=True)),
  22. ('modified_time', models.DateTimeField(blank=True, null=True)),
  23. ('history_id', models.AutoField(primary_key=True, serialize=False)),
  24. ('history_date', models.DateTimeField(db_index=True)),
  25. ('history_change_reason', models.CharField(max_length=100, null=True)),
  26. ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
  27. ('creation_user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
  28. ('group', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='auth.group')),
  29. ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
  30. ('modified_user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
  31. ('owner', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
  32. ],
  33. options={
  34. 'verbose_name': 'historical piki page',
  35. 'verbose_name_plural': 'historical piki pages',
  36. 'ordering': ('-history_date', '-history_id'),
  37. 'get_latest_by': ('history_date', 'history_id'),
  38. },
  39. bases=(simple_history.models.HistoricalChanges, models.Model),
  40. ),
  41. migrations.CreateModel(
  42. name='PikiPage',
  43. fields=[
  44. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  45. ('rel_path', models.CharField(max_length=1000, unique=True)),
  46. ('page_txt', models.TextField(max_length=50000)),
  47. ('tags', models.CharField(blank=True, max_length=1000, null=True)),
  48. ('deleted', models.BooleanField(default=False)),
  49. ('creation_time', models.DateTimeField(blank=True, null=True)),
  50. ('modified_time', models.DateTimeField(blank=True, null=True)),
  51. ('creation_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='creation_user', to=settings.AUTH_USER_MODEL)),
  52. ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='group', to='auth.group')),
  53. ('modified_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='modified_user', to=settings.AUTH_USER_MODEL)),
  54. ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='owner', to=settings.AUTH_USER_MODEL)),
  55. ],
  56. ),
  57. ]