Make accesstokens.user_agent NULL by default

The field is currently unused in the app, and it was causing problems in
SQLite.

Ref T529
pull/45/head
Matt Baer 6 years ago
parent 9fb7777c33
commit a3e287a77a
  1. 2
      schema.sql
  2. 2
      sqlite.sql

@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `accesstokens` (
`one_time` tinyint(1) NOT NULL DEFAULT '0',
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`expires` datetime DEFAULT NULL,
`user_agent` varchar(255) NOT NULL,
`user_agent` varchar(255) DEFAULT NULL,
PRIMARY KEY (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `accesstokens` (
one_time INTEGER NOT NULL DEFAULT '0',
created DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
expires DATETIME DEFAULT NULL,
user_agent TEXT NOT NULL
user_agent TEXT DEFAULT NULL
);
-- --------------------------------------------------------

Loading…
Cancel
Save