55 lines
2.3 KiB
Python
55 lines
2.3 KiB
Python
# Generated by Django 5.1.5 on 2025-01-23 05:38
|
||
|
||
import django.db.models.deletion
|
||
from django.db import migrations, models
|
||
|
||
|
||
class Migration(migrations.Migration):
|
||
|
||
initial = True
|
||
|
||
dependencies = [
|
||
]
|
||
|
||
operations = [
|
||
migrations.CreateModel(
|
||
name='SSHCredential',
|
||
fields=[
|
||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
('hostname', models.CharField(max_length=255)),
|
||
('username', models.CharField(max_length=100)),
|
||
('password', models.CharField(max_length=100)),
|
||
('port', models.IntegerField(default=22)),
|
||
('is_online', models.BooleanField(default=False)),
|
||
('last_check', models.DateTimeField(auto_now=True)),
|
||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
],
|
||
),
|
||
migrations.CreateModel(
|
||
name='Project',
|
||
fields=[
|
||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
('name', models.CharField(max_length=255)),
|
||
('folder_name', models.CharField(max_length=255)),
|
||
('path', models.CharField(max_length=500)),
|
||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
('ssh_credential', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ssh_manager.sshcredential')),
|
||
],
|
||
),
|
||
migrations.CreateModel(
|
||
name='SSHLog',
|
||
fields=[
|
||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
('log_type', models.CharField(choices=[('connection', 'Bağlantı Kontrolü'), ('command', 'Komut Çalıştırma'), ('folder', 'Klasör İşlemi')], max_length=20)),
|
||
('command', models.TextField()),
|
||
('output', models.TextField()),
|
||
('status', models.BooleanField(default=True)),
|
||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
('ssh_credential', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ssh_manager.sshcredential')),
|
||
],
|
||
options={
|
||
'ordering': ['-created_at'],
|
||
},
|
||
),
|
||
]
|