Compare commits

...

5 Commits

Author SHA1 Message Date
f3514d399e Merge pull request 'dev' (#27) from dev into master
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
Reviewed-on: #27
2026-04-14 23:44:35 +00:00
1e72aa3e44 Merge pull request 'Update 0001_initial.py' (#26) from pre-dev into dev
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
DEPLOY_MULTI_BRACH/pipeline/pr-master This commit looks good
Reviewed-on: #26
2026-04-14 23:17:11 +00:00
minguezsanzjuanjose
84baf8fbda Update 0001_initial.py
Some checks are pending
DEPLOY_MULTI_BRACH/pipeline/pr-dev Build queued...
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
2026-04-15 01:16:07 +02:00
b08e74f459 Merge pull request 'fix' (#25) from pre-dev into dev
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
Reviewed-on: #25
2026-04-14 23:02:44 +00:00
minguezsanzjuanjose
5d69f89028 fix
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
2026-04-15 01:01:46 +02:00
3 changed files with 37 additions and 2 deletions

1
.gitignore vendored
View File

@@ -10,7 +10,6 @@ deployments/docker-compose.yml
postgres_data/
local_postgres_data/
*.pyc
apps/backend_admin/migrations/0001_initial.py
# Bloquear todos los .env en cualquier carpeta
.env
**/core/.env

View File

@@ -0,0 +1,35 @@
# Generated by Django 5.0.3 on 2026-04-14 23:15
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Log',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('user_id', models.IntegerField(default=0)),
('user', models.CharField(default='anonimo', max_length=255)),
('app_id', models.IntegerField(default=0)),
('remote_address', models.GenericIPAddressField(blank=True, null=True)),
('request', models.JSONField(blank=True, null=True)),
('response', models.JSONField(blank=True, null=True)),
('status_code', models.CharField(default='0', max_length=10)),
('path', models.CharField(max_length=255)),
('method', models.CharField(max_length=10)),
('createdAt', models.DateTimeField(default=django.utils.timezone.now)),
('updatedAt', models.DateTimeField(auto_now=True)),
],
options={
'db_table': 'audit_logs',
},
),
]

View File

@@ -17,9 +17,10 @@ class Log(models.Model):
createdAt = models.DateTimeField(default=timezone.now)
updatedAt = models.DateTimeField(auto_now=True)
class Meta:
db_table = 'audit_logs'
managed = False # Al estar la tabla ya creada, Django no intentará modificarla
# managed = True <-- Asegúrate de que no esté en False
def __str__(self):
return f"{self.method} {self.path} ({self.status_code})"