Probably a DB schema bug

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Probably a DB schema bug

Shawn Y.
The field/colume "osd_name" in the table "osd_states" should be UNIque.  It IS set so in source/vsm/vsm/db/sqlalchemy/models.py: OsdState(), but the flag is gone when I check the table schema on the server, shown in high-light:

osd_states_table.jpg

Suggested fix:

Change line 32 in file:

cellarium/src/scripts/virtual-storage-manager-2.0.0/source/vsm/vsm/db/sqlalchemy/migrate_repo/versions/003_osd_state.py

from:

         Column('osd_name', String(length=255), nullable=False),

to:

        Column('osd_name', String(length=255), unique=True, nullable=False),

Thanks,

Reply | Threaded
Open this post in threaded view
|

RE: Probably a DB schema bug

ywang19
Administrator

Applied.

 

From: Shawn Y. [via vsm-discuss] [mailto:ml-node+[hidden email]]
Sent: Saturday, December 12, 2015 2:14 AM
To: Wang, Yaguang
Subject: Probably a DB schema bug

 

The field/colume "osd_name" in the table "osd_states" should be UNIque.  It IS set so in source/vsm/vsm/db/sqlalchemy/models.py: OsdState(), but the flag is gone when I check the table schema on the server, shown in high-light:

osd_states_table.jpg

Suggested fix:

Change line 32 in file:

cellarium/src/scripts/virtual-storage-manager-2.0.0/source/vsm/vsm/db/sqlalchemy/migrate_repo/versions/003_osd_state.py

from:

         Column('osd_name', String(length=255), nullable=False),

to:

        Column('osd_name', String(length=255), unique=True, nullable=False),

Thanks,



If you reply to this email, your message will be added to the discussion below:

http://vsm-discuss.33411.n7.nabble.com/Probably-a-DB-schema-bug-tp286.html

To start a new topic under vsm-discuss, email [hidden email]
To unsubscribe from vsm-discuss, click here.
NAML