Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8723357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:36:33+00:00 2026-06-13T07:36:33+00:00

I have some legacy oracle database against which I run inspectdb command. One column

  • 0

I have some legacy oracle database against which I run inspectdb command.
One column in the DB has type NUMBER (without precision and scale) and
what I got from django is:

entity_id = models.DecimalField(unique=True, null=True, max_digits=0, decimal_places=-127, blank=True)

If I now run syndb trying to generate schema from the model I will get
the error:

Error: One or more models did not validate:
DecimalFields require a "decimal_places" attribute that is a non-negative integer.
DecimalFields require a "max_digits" attribute that is a positive integer.

My question is: how should I modify entity_id type oin the model to
get NUMBER generated in oracle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:36:34+00:00Added an answer on June 13, 2026 at 7:36 am

    I think I figured out the answer. It looks like django is actually very smart and produce this wired values on purpose. The goal is to prevent creation a model from this schema without developer looking at it. This makes sense as in general using NUMBER type without scale and precision leaves django without any clue what actually this field should be. NUMBER is most generic number type and can fit boolean values, integers with and without sign and numbers that should be floating point. This is why educated decision from developer is needed here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For legacy reasons, we have a VARCHAR2 column in our Oracle 10 database—where the
I have some legacy code with a method foo which has 700+ overloads: [DllImport(3rdparty.dll)]
I'm working with a legacy database in Oracle and some of my tables have
I need to integrate some legacy 32-bit code - for which I don't have
We have some legacy database mappings in GORM and several have a primary key
I have some legacy code with linq2sql classes. DataContext class has following definition for
I have some (legacy embedded c) code which produces a .csv file by means
I have a Rails project which has a Postgres database for the actual application
We have a legacy/production database. It has been in continuous development and use backing
We have some legacy code that needs to identify in the Page_Load which event

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.