Emanuel Real gamboa@emanuelrealgamboa
Hola ¿A que se deberá que no me hace las migraciones? Me dice migraciones no aplicadas :
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py makemigrations
Migrations for 'blog':
blog/migrations/0001_initial.py
- Create model Articulos
- Create model Comentarios
- Create model Persona
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, blog, contenttypes, sessions
Running migrations:
No migrations to apply.
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py sqlmigrate blog 0001
-- Create model Articulos
CREATE TABLE blog_articulos
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, titulo
varchar(50) NOT NULL, img
varchar(255) NOT NULL, descripcion
varchar(250) NOT NULL, autor
varchar(20) NOT NULL);
-- Create model Comentarios
CREATE TABLE blog_comentarios
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, comentario
varchar(150) NOT NULL);
-- Create model Persona
CREATE TABLE blog_persona
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, nombre
varchar(10) NOT NULL, apellido
varchar(10) NOT NULL);
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, blog, contenttypes, sessions
Running migrations:
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py makemigrations blog
No changes detected in app 'blog'
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py sqlmigrate blog 0001
-- Create model Articulos
CREATE TABLE blog_articulos
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, titulo
varchar(50) NOT NULL, img
varchar(255) NOT NULL, descripcion
varchar(250) NOT NULL, autor
varchar(20) NOT NULL);
-- Create model Comentarios
CREATE TABLE blog_comentarios
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, comentario
varchar(150) NOT NULL);
-- Create model Persona
CREATE TABLE blog_persona
(id
bigint AUTO_INCREMENT NOT NULL PRIMARY KEY, nombre
varchar(10) NOT NULL, apellido
varchar(10) NOT NULL);
(env) ramses@MacBook-Air-de-Josue edteam_django % python3 manage.py migrate blog
Operations to perform:
Apply all migrations: blog
Running migrations:
No migrations to apply.
Escribe una respuesta