mirror of https://github.com/jumpserver/jumpserver
24 lines
660 B
Python
24 lines
660 B
Python
![]() |
# Generated by Django 4.1.13 on 2024-12-04 07:16
|
||
|
|
||
|
from django.db import migrations
|
||
|
|
||
|
|
||
|
def migrate_platform_sqlserver_automation(apps, schema_editor):
|
||
|
platform_model = apps.get_model('assets', 'Platform')
|
||
|
platform = platform_model.objects.filter(name='SQLServer').first()
|
||
|
|
||
|
if platform:
|
||
|
automation = platform.automation
|
||
|
automation.gather_accounts_method = 'gather_accounts_sqlserver'
|
||
|
automation.save()
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
dependencies = [
|
||
|
('assets', '0010_alter_automationexecution_duration'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RunPython(migrate_platform_sqlserver_automation)
|
||
|
]
|