I'm trying to union to tables together into a view but when the second table fills with (false or 0), it will convert the tinyint(1) into a bigint.
CREATE OR REPLACE VIEW people AS
SELECT
`id`, /*int*/
`active` /*TINYINT(1)*/
FROM
`table1`
UNION ALL
SELECT
`id`, /*int*/
0 AS `active` /* fill second column */
FROM
`table2`
When I look at the fieldtype description it says
id | int | binary | 11 | 2 | 0 |
active | bigint | binary | 19 | 19 | 0 |
How can I get get the active (supposed to be bool/tinyint(1)) to stay the same data type after unioning?