Skip to content

Commit

Permalink
Change assertions to only prevent downgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Dec 28, 2023
1 parent 496f122 commit a26dd78
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/murmur/database/ACLTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ namespace server {
void ACLTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/BanTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ namespace server {
void BanTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelLinkTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ namespace server {
void ChannelLinkTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelListenerTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ namespace server {
void ChannelListenerTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 9) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelPropertyTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ namespace server {
void ChannelPropertyTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ChannelTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ namespace server {
void ChannelTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ConfigTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace server {
void ConfigTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/GroupMemberTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ namespace server {
void GroupMemberTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/GroupTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ namespace server {
void GroupTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/LogTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace server {
void LogTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/ServerTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace server {
void ServerTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/UserPropertyTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace server {
void UserPropertyTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/murmur/database/UserTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ namespace server {
void UserTable::migrate(unsigned int fromSchemeVersion, unsigned int toSchemeVersion) {
// Note: Always hard-code old table and column names in this function in order to ensure that this
// migration path always stays the same regardless of whether the respective named constants change.
assert(fromSchemeVersion < toSchemeVersion);
assert(fromSchemeVersion <= toSchemeVersion);

try {
if (fromSchemeVersion < 8) {
Expand Down

0 comments on commit a26dd78

Please sign in to comment.