change permission
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 14:34
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0004_remove_user_first_name_remove_user_last_name_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='permission',
|
||||
options={'verbose_name': 'Sahifa uchun ruxsatnoma', 'verbose_name_plural': 'Sahifa uchun ruxsatnomalar'},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PermissionToTab',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('code', models.CharField(max_length=100, unique=True)),
|
||||
('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='permission_tabs', to='accounts.permission')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': "Bo'lim uchun ruxsatnoma",
|
||||
'verbose_name_plural': "Bo'lim uchun ruxsatnomalar",
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 14:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0005_alter_permission_options_permissiontotab'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='permissiontotab',
|
||||
name='permission',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='role',
|
||||
name='permissions_tab',
|
||||
field=models.ManyToManyField(blank=True, related_name='roles', to='accounts.permissiontotab'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 14:46
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0006_remove_permissiontotab_permission_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='role',
|
||||
name='permissions_tab',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='permission',
|
||||
name='permission_tab',
|
||||
field=models.ManyToManyField(related_name='permissions', to='accounts.permissiontotab'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user