Remove unused DB columns, fix some tab order.

This commit is contained in:
Martin Rotter 2017-09-15 08:51:23 +02:00
parent bdb87ac6b3
commit ebddff6fb1
7 changed files with 14 additions and 59 deletions

View File

@ -101,29 +101,3 @@ CREATE TABLE IF NOT EXISTS Messages (
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);
-- !
DROP TABLE IF EXISTS Labels;
-- !
CREATE TABLE IF NOT EXISTS Labels (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
account_id INTEGER NOT NULL,
color_fg TEXT NOT NULL,
color_bg TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
custom_id TEXT,
custom_hash TEXT,
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);
-- !
DROP TABLE IF EXISTS LabelsInMessages;
-- !
CREATE TABLE IF NOT EXISTS LabelsInMessages (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
message_custom_id TEXT NOT NULL,
label_custom_id TEXT NOT NULL,
account_id INTEGER NOT NULL,
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);

View File

@ -96,31 +96,3 @@ CREATE TABLE IF NOT EXISTS Messages (
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);
-- !
DROP TABLE IF EXISTS Labels;
-- !
CREATE TABLE IF NOT EXISTS Labels (
id INTEGER PRIMARY KEY,
account_id INTEGER NOT NULL,
color_fg TEXT NOT NULL,
color_bg TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
custom_id TEXT,
custom_hash TEXT,
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);
-- !
DROP TABLE IF EXISTS LabelsInMessages;
-- !
CREATE TABLE IF NOT EXISTS LabelsInMessages (
id INTEGER PRIMARY KEY,
message_custom_id TEXT NOT NULL,
label_custom_id TEXT NOT NULL,
account_id INTEGER NOT NULL,
FOREIGN KEY (message_custom_id) REFERENCES Messages (custom_id),
FOREIGN KEY (label_custom_id) REFERENCES Labels (custom_id),
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);

View File

@ -1,4 +1,8 @@
ALTER TABLE OwnCloudAccounts
ADD COLUMN msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1);
-- !
DROP TABLE IF EXISTS Labels;
-- !
DROP TABLE IF EXISTS LabelsInMessages;
-- !
UPDATE Information SET inf_value = '9' WHERE inf_key = 'schema_version';

View File

@ -18,4 +18,8 @@ SELECT id, username, password, url, force_update FROM backup_oa;
-- !
DROP TABLE backup_oa;
-- !
DROP TABLE IF EXISTS Labels;
-- !
DROP TABLE IF EXISTS LabelsInMessages;
-- !
UPDATE Information SET inf_value = '9' WHERE inf_key = 'schema_version';

View File

@ -235,7 +235,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>83</width>
<width>98</width>
<height>69</height>
</rect>
</property>
@ -435,13 +435,13 @@ p, li { white-space: pre-wrap; }
</widget>
<tabstops>
<tabstop>m_tabAbout</tabstop>
<tabstop>m_txtInfo</tabstop>
<tabstop>m_txtLicenseGnu</tabstop>
<tabstop>m_txtChangelog</tabstop>
<tabstop>m_txtPathsSettingsType</tabstop>
<tabstop>m_txtPathsSettingsFile</tabstop>
<tabstop>m_txtPathsDatabaseRoot</tabstop>
<tabstop>m_txtPathsSkinsRoot</tabstop>
<tabstop>m_txtInfo</tabstop>
<tabstop>m_txtLicenseGnu</tabstop>
<tabstop>m_txtChangelog</tabstop>
<tabstop>m_txtLicenseBsd</tabstop>
</tabstops>
<resources/>

View File

@ -198,6 +198,7 @@
<tabstops>
<tabstop>m_checkRemoveReadMessages</tabstop>
<tabstop>m_checkRemoveRecycleBin</tabstop>
<tabstop>m_checkRemoveStarredMessages</tabstop>
<tabstop>m_checkShrink</tabstop>
<tabstop>m_checkRemoveOldMessages</tabstop>
<tabstop>m_spinDays</tabstop>

View File

@ -113,7 +113,7 @@ StatusBar* FormMain::statusBar() const {
void FormMain::showDbCleanupAssistant() {
if (qApp->feedUpdateLock()->tryLock()) {
FormDatabaseCleanup form(new FormDatabaseCleanup(this));
FormDatabaseCleanup form(this);
form.setCleaner(qApp->feedReader()->databaseCleaner());
form.exec();