Verified Commit 5f1fab4a authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Merge branch 'master' of gitlab.utc.fr:rdelaage/lo21-projet

parents decb8ff0 049f2d4c
......@@ -291,3 +291,141 @@ INSERT INTO Cellules VALUES(
4,
4
);
-- Oscillateur
INSERT INTO reseaux VALUES(
1,
"Grille oscillateur 4*4 - Brian's Brain",
4,
4,
"Brian's brain"
);
INSERT INTO Cellules VALUES(
1,
1,
2,
0,
0
);
INSERT INTO Cellules VALUES(
1,
1,
2,
0,
1
);
INSERT INTO Cellules VALUES(
1,
1,
2,
0,
2
);
INSERT INTO Cellules VALUES(
1,
1,
2,
0,
3
);
INSERT INTO Cellules VALUES(
1,
1,
2,
1,
0
);
INSERT INTO Cellules VALUES(
1,
1,
0,
1,
1
);
INSERT INTO Cellules VALUES(
1,
1,
0,
1,
2
);
INSERT INTO Cellules VALUES(
1,
1,
2,
1,
3
);
INSERT INTO Cellules VALUES(
1,
1,
2,
2,
0
);
INSERT INTO Cellules VALUES(
1,
1,
0,
2,
1
);
INSERT INTO Cellules VALUES(
1,
1,
0,
2,
2
);
INSERT INTO Cellules VALUES(
1,
1,
2,
2,
3
);
INSERT INTO Cellules VALUES(
1,
1,
2,
3,
0
);
INSERT INTO Cellules VALUES(
1,
1,
2,
3,
1
);
INSERT INTO Cellules VALUES(
1,
1,
2,
3,
2
);
INSERT INTO Cellules VALUES(
1,
1,
2,
3,
3
);
......@@ -9,7 +9,7 @@ Database::Database(std::string path): db(QSqlDatabase::addDatabase("QSQLITE")) {
throw "Unable to open database";
}
db.exec("CREATE TABLE IF NOT EXISTS automates (nom VARCHAR(30) PRIMARY KEY, defaut INTEGER NOT NULL)");
db.exec("CREATE TABLE IF NOT EXISTS automates (nom VARCHAR(30) PRIMARY KEY, defaut INTEGER NOT NULL, description TEXT NOT NULL, auteur VARCHAR(30), annee DATE)");
db.exec("CREATE TABLE IF NOT EXISTS regles_transition (id VARCHAR(30) NOT NULL, min1 INTEGER, min2 INTEGER, min3 INTEGER, min4 INTEGER, min5 INTEGER, min6 INTEGER, min7 INTEGER, min8 INTEGER, max1 INTEGER, max2 INTEGER, max3 INTEGER, max4 INTEGER, max5 INTEGER, max6 INTEGER, max7 INTEGER, max8 INTEGER, courant INTEGER, destination INTEGER NOT NULL, FOREIGN KEY('id') REFERENCES 'automates'('nom'))");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment