// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// Foobar is distributed in the hope that it will be useful,
+// EmuFront is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
-// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
+// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include <QObject>
#include <QSqlDatabase>
qDebug() << "Creating TABLE mediaimagecontainer";
ret = query.exec("CREATE TABLE IF NOT EXISTS mediaimagecontainer "
- "(id INTEGER PRIMARY KEY, "
- "fileid INTEGER REFERENCES file(id), "
+ "(fileid INTEGER REFERENCES file(id), "
"filepathid INTEGER REFERENCES filepath(id), "
"updatetime NUMERIC)");
qDebug() << "Creating TABLE mediaimagecontainer_mediaimage";
ret = query.exec("CREATE TABLE IF NOT EXISTS mediaimagecontainer_mediaimage "
- "(mediaimagecontainerid INTEGER, "
- "fileid INTEGER, "
- "FOREIGN KEY (mediaimagecontainerid) REFERENCES mediaimagecontainer(id), "
- "FOREIGN KEY (fileid) REFERENCES file(id))");
+ "(mediaimagecontainerid INTEGER REFERENCES file(id), "
+ "mediaimageid INTEGER REFERENCES file(id))");
if (!ret) throw QString("mediaimagecontainer_mediaimage");