Makemigrations/migrate in existing database

2021-06-04 Thread Ankita Sharma


Hello Team
Hope all are doing great

I have a database in microsoft sql server. I created tables and views in it.

I ran py manage.py inspetdb  > Models.py and populated my models.py file . 
I also don't want my model to alter my database. I just want it for data 
retrieval.

*Should I definitely run migrate/makemigrations?*

*After inspectdb should i apply makemigrations on my app or is just migrate 
enough?* And also what are the points to remember while using inspectdb on 
an existing database.

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/908ff564-adca-4b64-9ec4-e347a3818efbn%40googlegroups.com.


Re: Makemigrations/migrate in existing database

2021-06-04 Thread Mahendra
I think surely run makemigrations and migrate

Mahendra Yadav

On Fri, 4 Jun 2021, 18:28 Ankita Sharma,  wrote:

> Hello Team
> Hope all are doing great
>
> I have a database in microsoft sql server. I created tables and views in
> it.
>
> I ran py manage.py inspetdb  > Models.py and populated my models.py file .
> I also don't want my model to alter my database. I just want it for data
> retrieval.
>
> *Should I definitely run migrate/makemigrations?*
>
> *After inspectdb should i apply makemigrations on my app or is just
> migrate enough?* And also what are the points to remember while using
> inspectdb on an existing database.
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/908ff564-adca-4b64-9ec4-e347a3818efbn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-6G3ykKx-Ab7qGAHhDL5WXNWL8bSU8_H5Hioypa%2Ba8A8CXzA%40mail.gmail.com.


Re: Makemigrations/migrate in existing database

2021-06-08 Thread Omkar D
```
python manage.py makemigrations
python manage.py migrate --fake
```

On Friday, June 4, 2021 at 7:21:03 PM UTC+5:30 Mahendra Yadav wrote:

> I think surely run makemigrations and migrate
>
> Mahendra Yadav
>
> On Fri, 4 Jun 2021, 18:28 Ankita Sharma,  wrote:
>
>> Hello Team
>> Hope all are doing great
>>
>> I have a database in microsoft sql server. I created tables and views in 
>> it.
>>
>> I ran py manage.py inspetdb  > Models.py and populated my models.py file 
>> . I also don't want my model to alter my database. I just want it for data 
>> retrieval.
>>
>> *Should I definitely run migrate/makemigrations?*
>>
>> *After inspectdb should i apply makemigrations on my app or is just 
>> migrate enough?* And also what are the points to remember while using 
>> inspectdb on an existing database.
>>
>> Thanks in advance
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/908ff564-adca-4b64-9ec4-e347a3818efbn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/312a92d4-081d-445a-80d4-754781cdc458n%40googlegroups.com.


Re: Makemigrations/migrate in existing database

2021-06-08 Thread Gabriel Araya Garcia
No. Only take sure That model structure about your tables should be the
same fields in your database

El vie., 4 jun. 2021 8:58, Ankita Sharma 
escribió:

> Hello Team
> Hope all are doing great
>
> I have a database in microsoft sql server. I created tables and views in
> it.
>
> I ran py manage.py inspetdb  > Models.py and populated my models.py file .
> I also don't want my model to alter my database. I just want it for data
> retrieval.
>
> *Should I definitely run migrate/makemigrations?*
>
> *After inspectdb should i apply makemigrations on my app or is just
> migrate enough?* And also what are the points to remember while using
> inspectdb on an existing database.
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/908ff564-adca-4b64-9ec4-e347a3818efbn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVvSDDoUJSy8i_qCAB0bfiqEsfNv5mudGVGr04yG2vkHy9dUQ%40mail.gmail.com.