Adding float type to MySQL.
This commit is contained in:
parent
dc32c90aaa
commit
c6d80e2265
|
@ -3,6 +3,7 @@ USE main;
|
||||||
CREATE TABLE Persons (
|
CREATE TABLE Persons (
|
||||||
PersonID int NOT NULL AUTO_INCREMENT,
|
PersonID int NOT NULL AUTO_INCREMENT,
|
||||||
CreatedAt datetime,
|
CreatedAt datetime,
|
||||||
|
Age float,
|
||||||
LastName varchar(255),
|
LastName varchar(255),
|
||||||
FirstName varchar(255),
|
FirstName varchar(255),
|
||||||
Address varchar(255),
|
Address varchar(255),
|
||||||
|
@ -18,6 +19,6 @@ CREATE TABLE Tasks (
|
||||||
FOREIGN KEY(PersonID)
|
FOREIGN KEY(PersonID)
|
||||||
REFERENCES Persons(PersonID)
|
REFERENCES Persons(PersonID)
|
||||||
);
|
);
|
||||||
INSERT INTO Persons (FirstName, LastName, Address, City, CreatedAt) VALUES ('Mike', 'Hughes', '123 Fake Street', 'Belfast', '2021-01-19 03:14:07');
|
INSERT INTO Persons (FirstName, LastName, Age, Address, City, CreatedAt) VALUES ('Mike', 'Hughes', 28.2, '123 Fake Street', 'Belfast', '2021-01-19 03:14:07');
|
||||||
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'assembling');
|
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'assembling');
|
||||||
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'processing');
|
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'processing');
|
||||||
|
|
|
@ -29,6 +29,7 @@ module MySQLModule {
|
||||||
blob: FieldTypes.LONGFORM,
|
blob: FieldTypes.LONGFORM,
|
||||||
enum: FieldTypes.STRING,
|
enum: FieldTypes.STRING,
|
||||||
varchar: FieldTypes.STRING,
|
varchar: FieldTypes.STRING,
|
||||||
|
float: FieldTypes.NUMBER,
|
||||||
int: FieldTypes.NUMBER,
|
int: FieldTypes.NUMBER,
|
||||||
numeric: FieldTypes.NUMBER,
|
numeric: FieldTypes.NUMBER,
|
||||||
bigint: FieldTypes.NUMBER,
|
bigint: FieldTypes.NUMBER,
|
||||||
|
|
Loading…
Reference in New Issue