* @author Robin Appelman * @author Thomas Müller * @author Victor Dubiniuk * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ namespace OC\DB; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Types\BigIntType; use Doctrine\DBAL\Types\Type; class SQLiteMigrator extends Migrator { /** * @param \Doctrine\DBAL\Schema\Schema $targetSchema * @throws \OC\DB\MigrationException * * For sqlite we simple make a copy of the entire database, and test the migration on that */ public function checkMigrate(\Doctrine\DBAL\Schema\Schema $targetSchema) { $dbFile = $this->connection->getDatabase(); $tmpFile = $this->buildTempDatabase(); copy($dbFile, $tmpFile); $connectionParams = array( 'path' => $tmpFile, 'driver' => 'pdo_sqlite', ); $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams); try { $this->applySchema($targetSchema, $conn); $conn->close(); unlink($tmpFile); } catch (DBALException $e) { $conn->close(); unlink($tmpFile); throw new MigrationException('', $e->getMessage()); } } /** * @return string */ private function buildTempDatabase() { $dataDir = $this->config->getSystemValue("datadirectory", \OC::$SERVERROOT . '/data'); $tmpFile = uniqid("oc_"); return "$dataDir/$tmpFile.db"; } /** * @param Schema $targetSchema * @param \Doctrine\DBAL\Connection $connection * @return \Doctrine\DBAL\Schema\SchemaDiff */ protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { $platform = $connection->getDatabasePlatform(); $platform->registerDoctrineTypeMapping('tinyint unsigned', 'integer'); $platform->registerDoctrineTypeMapping('smallint unsigned', 'integer'); $platform->registerDoctrineTypeMapping('varchar ', 'string'); // with sqlite autoincrement columns is of type integer foreach ($targetSchema->getTables() as $table) { foreach ($table->getColumns() as $column) { if ($column->getType() instanceof BigIntType && $column->getAutoincrement()) { $column->setType(Type::getType('integer')); } } } return parent::getDiff($targetSchema, $connection); } } value='dependabot/maven/org.eclipse.jetty-jetty-webapp-9.4.44.v20210927'>dependabot/maven/org.eclipse.jetty-jetty-webapp-9.4.44.v20210927 Vaadin 6, 7, 8 is a Java framework for modern Java web applications: https://github.com/vaadin/frameworkwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 5b93ce3742e195a0c32ac99ce9507774defff8a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
title: Overview
order: 1
layout: page
---

[[installing.overview]]
= Overview

You can develop Vaadin applications in essentially any development environment
that has the Java SDK and deploys to a Java Servlet container.
You can use Vaadin with any Java IDE or no IDE at all.
Vaadin has special support for the Eclipse and NetBeans IDEs, as well as for IntelliJ IDEA.

.Vaadin installation steps
image::img/installation-steps-hi.png[width=100%, scaledwidth=100%]

Managing Vaadin and other Java libraries can get tedious to do manually, so using a build system that manages dependencies automatically is adviced.
Vaadin is distributed in the Maven central repository, and can be used with any build or dependency management system that can access Maven repositories, such as Ivy or Gradle, in addition to Maven.

Vaadin has a multitude of installation options for different IDEs and dependency
managers.
You can also install it from an installation package:

* With the Eclipse IDE, use the Vaadin Plugin for Eclipse, as described in <<installing.eclipse,"Vaadin Plugin for Eclipse">>
* With the Vaadin plugin for NetBeans IDE ( <<dummy/../../../framework/getting-started/getting-started-netbeans#getting-started.netbeans,"Creating a Project with NetBeans IDE">>) or IntelliJ IDEA
* With Maven, Ivy, Gradle, or other Maven-compatible dependency manager, under Eclipse, NetBeans, IDEA, or using command-line, as described in <<dummy/../../../framework/getting-started/getting-started-maven#getting-started.maven,"Using Vaadin with Maven">>
* From installation package without dependency management, as described in <<dummy/../../../framework/getting-started/getting-started-package#getting-started.package,"Vaadin Installation Package">>