auraphp / aura.sqlschema Goto Github PK
View Code? Open in Web Editor NEWIndependent schema discovery tools for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
License: BSD 2-Clause "Simplified" License
Independent schema discovery tools for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
License: BSD 2-Clause "Simplified" License
The doc affirms:
$schema = new MysqlSchema($pdo);
while in the source the __constructor is:
public function __construct(PDO $pdo, ColumnFactory $column_factory)
so it will always be an error, since no ColumnFactory is provided.
The error is:
PHP Catchable fatal error: Argument 2 passed to Aura\Sql_Schema\AbstractSchema::__construct() must be an instance of Aura\Sql_Schema\ColumnFactory, none given, called in /home/fale/sql2md/src/sql2json.php on line 17 and defined in /home/fale/sql2md/vendor/aura/sql-schema/src/AbstractSchema.php on line 69
Composer.json
specifies 5.3 compatibility, but a fatal error is thrown under 5.3:
Fatal error: Can't inherit abstract function Aura\SqlSchema\SchemaInterface::fetchTableList() (previously declared abstract in Aura\SqlSchema\AbstractSchema) in C:\...\sqlschema\src\AbstractSchema.php on line 23
I'm going to suggest removing the abstract methods in AbstractSchema
- the same methods (and documentation) are already defined in SchemaInterface
, so they are redundant to begin with. The abstract class isn't required to complete the interface in the first place, and doesn't complete it by adding abstract methods anyway, since abstract methods are basically just an anonymous interface embedded in an abstract class...
Add functionality to discover the database type (from the connection string for example) and use the apropriate methods to list tables, fields, indexes automatically - so there is no need to create driver-specific classes. Thanks.
Being able to fetch a table by dot notation.
I am using sqlsrv.
Sometimes my connection is set to use ex. table "global.dbo.some_table" and when it is set to this, which is perfectly valid, it unfortunately fails to retrieve the colums.
Hi guys,
This is regarding the renaming discussion happening at
https://groups.google.com/d/msg/auraphp/JNnklDBaGnU/kKG2MoC8Jm0J
I noticed @cordoval 's work on https://github.com/cordoval/random-packagist-test/blob/master/composer.json#L3 .
So I feel it is good to have a composer.json in Aura.Sql_Schema
with
{
"name": "aura/sql-query",
"replace": {
"aura/sqlquery": "no-sure on version"
}
}
So the new package aura/sqlquery
can be found by the old one aura/sql-query
.
If you guys have any insights on this it will be great help. / cc @simensen
Thank you.
I have been using this package in some applications running in a PHP 7.4 environment. When I upgraded to PHP 8.1 and ran the applications I got the following deprecation warnings:
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
PHP Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in C:\SoftwareProjects\test-php-project\vendor\aura\sqlschema\src\MysqlSchema.php on line 121
So I decided to fork this project and created a new branch rotexsoft/Aura.SqlSchema@2.x...3.0.1 in my fork that makes the code compatible with PHP 8.1 & also made it support mariadb & Postgres (which doesn't work on the latest version 2.0.3). Details of the changes I made can be found here https://github.com/rotexdegba/Aura.SqlSchema/releases
If accepted, these changes should be merged into a 3.x branch and a new 3.0.0 major release should be created.
Looking forward to hearing back from you.
If I don't hear back by the end of this week (Sunday Feb 11, 2024), I will just go ahead to create a new package on packagist from my fork & just adjust the namespaces, because I really need these changes in an application that I will be updating to PHP 8.1 in production. I have tried to look for an email address for Paul Jones or Hari K T but couldn't find any and I could not post to the Google group it seems to have posting disabled or maybe because I just joined the group.
Thanks.
Table reflection is missing - we need a table model to reflect things like comments on tables, storage types, and whatever other table metadata each storage engine might provide.
This will be a BC break, since tables are currently reflected as strings, so there is no existing table model we can flesh out with these properties.
I'd like to be able to have a database/table schema defined in some type of config file.
Then I'd like to use Sql_Schema to compare the existing database schema with the new schema in my config file.
I would then like to be able to use the comparison to build the database queries needed to update the database schema to my new schema and pass it to something similar to __toString(), which can be passed to PDO or ExtendedPdo.
I am prepared to create my own library to do this, but wanted to know if this would fit in the domain of what Sql_Schema does. Or should this go into another library, like Sql_SchemaManager?
What do you think?
I'd be happy to send PR's if you'd like.
What is the future of this project? In my opinion, it is feature complete and only needs to have the latest versions of PHP (7.3, 7.4 & 8.0 as of this writing) tested via travis or Github Actions to ensure it continues to work with the currently supported version of PHP. Will anyone be updating the CI tests for this project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.