{{{
class Student(models.Model):
stu_name = models.CharField(max_length=6, unique=True)
}}}
In the views, I want the SQL to create the student table in the database.
--
Ticket URL: <https://code.djangoproject.com/ticket/33103>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => fixed
Comment:
use commands:
manage.py makemigrations
manage.py migrate
manage.py sqlmigrate model <migration number>
manage.py showmigrations
--
Ticket URL: <https://code.djangoproject.com/ticket/33103#comment:1>
* keywords: => Closed
--
Ticket URL: <https://code.djangoproject.com/ticket/33103#comment:2>
Comment (by Abhijith Ganesh):
Use ORM to get the SQL
--
Ticket URL: <https://code.djangoproject.com/ticket/33103#comment:3>
* resolution: fixed => invalid
Comment:
See TicketClosingReasons/UseSupportChannels for ways to get help with
Django usage.
--
Ticket URL: <https://code.djangoproject.com/ticket/33103#comment:4>
* status: new => closed
--
Ticket URL: <https://code.djangoproject.com/ticket/33103#comment:5>