+--
+-- VIEW application-view
+--
+DROP VIEW IF EXISTS `application-view`;
+CREATE VIEW `application-view` AS SELECT
+ `application`.`id` AS `id`,
+ `application-token`.`uid` AS `uid`,
+ `application`.`name` AS `name`,
+ `application`.`redirect_uri` AS `redirect_uri`,
+ `application`.`website` AS `website`,
+ `application`.`client_id` AS `client_id`,
+ `application`.`client_secret` AS `client_secret`,
+ `application-token`.`code` AS `code`,
+ `application-token`.`access_token` AS `access_token`,
+ `application-token`.`created_at` AS `created_at`,
+ `application-token`.`scopes` AS `scopes`,
+ `application-token`.`read` AS `read`,
+ `application-token`.`write` AS `write`,
+ `application-token`.`follow` AS `follow`
+ FROM `application-token`
+ INNER JOIN `application` ON `application-token`.`application-id` = `application`.`id`;
+