I'm subclassing an existing model (from another application entirely) and want my model to have its own database table. An identical clone/replica of the original table, not just a table with a pointer to the data stored in the "parent" table.
Here's my model:
class A (models.Model):
name = models.CharField('name')
class MyA (A):
class Meta:
db_table = 'My_A'
Here's my DB tables:
CREATE TABLE A
(
id serial NOT NULL,
"name" character varying(50) NOT NULL,
...
)
CREATE TABLE My_A
(
A_ptr_id integer NOT NULL,
...
)
And here's what I would like to have:
CREATE TABLE A
(
id serial NOT NULL,
"name" character varying(50) NOT NULL,
...
)
CREATE TABLE My_A
(
id serial NOT NULL,
"name" character varying(50) NOT NULL,
...
)
Edit: I ended up copy-pasting the 3rd party model
MyAandA?