Giter Site home page Giter Site logo

protoqol / prequel Goto Github PK

View Code? Open in Web Editor NEW
1.5K 34.0 94.0 14.88 MB

Prequel for Laravel. Clear and concise database management.

Home Page: https://packagist.org/packages/protoqol/prequel

License: MIT License

PHP 4.88% JavaScript 90.18% CSS 0.72% Vue 4.16% Blade 0.06%
database-management database laravel protoqol prequel php developer-tools development-environment

prequel's People

Contributors

aaronsaray avatar adamczykpiotr avatar ajthinking avatar aminusia avatar chuckrincon avatar dependabot[bot] avatar djaxho avatar habiboiv avatar hapidjus avatar hdvinnie avatar imgbotapp avatar james-n-m avatar liyu001989 avatar lukadriel7 avatar m4st3rx avatar mchlbatista avatar mcmc4519 avatar michal3377 avatar muhammad-sarfaraz avatar phillipmwaniki avatar quintenjustus avatar seriquynh avatar timoschwarzer avatar zippoxer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prequel's Issues

[BUG] Data cell count does not match table header column count

For the default users table in Laravel, the cell count of table data does not match header cell count.

To Reproduce
Steps to reproduce the behavior:

  1. create a blank Laravel installation
  2. run artisan make:auth
  3. Register default user
  4. Install Prequel
  5. Open users table

The header has the following fields:
id, name, email, email_verified_at, password, remember_token, created_at, updated_at

The data row only has
id, name, email, email_verified_at, created_at, updated_at

Screenshots
grafik

How to contribute [Question]

Hey @QuintenJustus, I want to contribute to this repository. I build apps with Vue and Laravel often. I also have a lot of cool ideas for this app.

Before I get carried away though, I just want to try making some basic contributions. Do you have any "good first issues" for me?

[BUG] Base URL is not appending

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[FIX] Clearer horizontal table scrolling

Currently it is not clear that you can scroll horizontally in the currently selected table.

Solutions might be

  1. Scroll bar at top instead of bottom
  2. Fade out on right side to indicate that there is more content
  3. Arrow pointing right with same purpose as 2.

[BUG] published config file db credentials don't seem to be used

Describe the bug
I altered my credentials in the config/prequel.php file and they don't seem to affect the existing connection.

To Reproduce
Steps to reproduce the behavior:

  1. modify config/prequel.php DB.PASSWORD field to something like aaron-is-causing-trouble and you should no longer be able to connect. You do, though.

Expected behavior
If these exist here, I should be able to change my configuration. I like them because I might want to give Prequel a read-only user - different than my main application, so I'd say try to fix it, not get rid of them. Just my opinion.

Additional context
Pretty low priority again.

[BUG] v1.22.2 not published?

It seems that v1.22.2 is not yet published, is that correct? I'm looking for the PostgreSQL bug fix regarding SequelAdapter missing, and am only getting v1.22.1.

Thanks.

[FEATURE REQUEST] Install only in dev env

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

it would be great install it only on dev environent, if its possible now and im missing someting please let me know

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[FEATURE REQUEST] Authorisation updates (Potential bug?)

Is your feature request related to a problem? Please describe.
Seems like Prequel strips out any authorisation when you hit the main page, meaning it's not possible to update / create any middleware which checks agains certain levels of access

This also means it's possible to access prequel without being logged into any area of the application.

Describe the solution you'd like
Ability to keep any logged in session in order to be able to check against certain guards or permissions on the logged in user.

Additional context
Not sure if this is actually a bug? just seems strange that there's no auth carried over, but if I head back to the rest of my application, I still have a session.

[BUG] phpmd result is in published

Describe the bug
When publishing the vendor public items, a phpmd.html file is published

To Reproduce
Steps to reproduce the behavior:

  1. Publish public vendor tag

Expected behavior
There would not be this file.

[BUG] Look for table ... returns all tables from all databases

Describe the bug
Look for Table... search field should restrict to tables of selected Database

To Reproduce
Steps to reproduce the behavior:

  1. Select a database
  2. search table name in the search field

Expected behavior
Should only display tables belong to the selected database

Screenshots
Screen Shot 2019-07-08 at 12 07 20 PM

Desktop (please complete the following information):

  • Browser: Chrome
  • Version: 75.0.3770.100

Smartphone (please complete the following information):
n/a

Additional context
Add any other context about the problem here.

[FEATURE REQUEST] Tests for source code

Is your feature request related to a problem? Please describe.
It is best practice to include some sort of unit, integration or feature type tests with your libraries. I tend not to use an open source product / library if they don't have adequate tests. Not only does it help with code quality and reducing bugs, it gives the reader an idea of how the product functions without having to do a deep-dive into the code.

Describe the solution you'd like
I'd like to see some unit tests for both front and back-end code. I'm not proposing anything insane like even 80% code, but some framework to get contributors started.

Additional context
It'd be nice to know if this is something that the author doesn't think is important, thinks they didn't have time to do, thinks isn't important, or doesn't know how to implement effectively. Sharing this sentiment can help contributors understand how to best proceed and help the project.

[FEATURE REQUEST] Align table headings and cells left

Is your feature request related to a problem? Please describe.
More of a personal preference but left aligning data tables makes it more readable to me

Describe the solution you'd like
Would be great if you could left align table data

Additional context
Here is a shot of the demo with centered data:
image

Here is a shot of the demo with left aligned:
image

[BUG] /prequel throwing an error - Blank White Page

Describe the bug
After installing the package, I tried to access /prequel and it's showing a blank white page. Error in the console.

To Reproduce
Steps to reproduce the behavior:

  1. Install the package as mentioned in the documentation
  2. Access /prequel and blank white page

Expected behavior
The /prequel page showing the databases and tables.

Screenshots
image

PHP Version

  • Version 7.2

Database type

  • MySQL

Desktop (please complete the following information):

  • Chrome
  • Version 79.0.3945.117

[BUG] Path Causes Loading Issue

Describe the bug
Changing the path in the prequel config file will cause an error when trying to load the data.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the prequel install directions on a fresh Laravel app
  2. Make sure you have a database connected and prequel works normally
  3. Go into the prequel config file and change the path to something like apps/prequel
  4. Try to load databases at custom URL.
  5. See error

Expected behavior
I expected prequel to be able to load databases at a custom URL

Screenshots
Screen Shot 2019-07-17 at 11 44 18 AM

Desktop (please complete the following information):

  • Browser Chrome
  • Version 70.0.3538.67 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: N/A
  • Browser N/A
  • Version N/A

Additional context
N/A

[BUG] Prequel not loading

Describe the bug
Installed on Laravel 5.7.28 followed the instructions and got an error in the console. See the screenshot.
As examined main.blade
<script> // Pass initial data to JavaScript window.Prequel = {}; window.Prequel.env = @json($env); window.Prequel.error = { error : false, detailed: '', code : '', }; window.Prequel.data = @json($data['collection']); window.Prequel.flat = @json($data['flatTableCollection']); </script>
problem occurs here: window.Prequel.data = @ json($data['collection']); (I've specially pressed space at json because github was mentioning related user)

Screenshots
prequel error

[BUG] Prequel not working

Describe the bug
I tried installing prequel which ended up in

To Reproduce
Steps to reproduce the behavior:

  1. Create a fresh installation of laravel
  2. install prequel using composer (i used the bets 0.6.2 version)
  3. copy config and public resources
  4. Run prequel
  5. Shows the below image.

Expected behavior
Prequel should run

Screenshots
image

Desktop (please complete the following information):

  • Laravel version : 5.8.28
  • php : 7.3
  • Windows 10
  • Using XAMPP

I tried changing the env variables in config and as per the screenshot prequel is not able to get the port number or its treating as NaN

[BUG] Invalid database connections

Here:

'env' => [
'connection' => config('database.default'),
'database' => config('database.connections.mysql.database'),
'host' => config('database.connections.mysql.host'),
'port' => config('database.connections.mysql.port'),
'user' => config('database.connections.mysql.username'),
],

In the settings may not exist connections named "mysql".

You should take the connection names from the config/prequel.php settings.

[FEATURE] Implement dark mode

Implement a dark mode, create a button in the top-right that can be switched on and off like the other 2 buttons.

[FEATURE REQUEST] Ability to see table structure even with empty tables

Is your feature request related to a problem? Please describe.
When creating new tables/migrations on a brand new project, its nice to be able to check if those table columns are in the correct place, correct collation, length etc, without having to push dummy data right away into it.

Describe the solution you'd like
At a minimum it would be great to have the table column structure still showing for empty tables.
A better implementation could also be a different view similar to phpMyAdmin's 'Structure' tab.

Describe alternatives you've considered
Filling the table with dummy data solves the issue slightly but It could be nicer to have a more detailed view instead of having to check out the migrations for that table.

[BUG] Counting of records will fail with a non-id column

Describe the bug
First of all, I apologize if this is not really a bug. I did come across some code, though, that I wanted to help with. I didn't see exactly how it was used at first glance.

The issue is in DatabaseController::countTableRecords() where it executes a ->count('id') call. This can be a problem with tables that don't have a column named id. I've seen a table named cars which had a primary key of car_id instead of just plain id.

Some people will try to do count on a column that is a primary key like that because of performance gains. However, with covering indexes, that's not really something you need to force. Check out this article: https://www.percona.com/blog/2007/04/10/count-vs-countcol/ - while there are very RARE cases when it makes sense to count on a column, most Laravel apps will probably have an id field that is a primary key/or/covering index. (Well aaron - if that's the case, what's wrong with the code as is? Right now - it forces you to have that column. By using the default call to count() which defaults to column * we can handle the few situations where there is no id column.)

Suggested fix
Modify count('id') to count('*')

[RFC] Adding i18n

Request For Comments: Internalization - i18n

I was thinking about all the features that Prequel is still missing and i18n came across my mind, but I'm not really sure if this is worth looking into. That's why I opened this RFC.

See points below for my thoughts about this.

  • Would this be helpful to people?
  • Is this worth investing time into?
  • Front-end or back-end implementation?
  • Are there people willing to translate this?

What do you think?

For those unaware of what i18n is, it's basically translating Prequel to other languages.

Don't infer database type from name and support multiple connections

AFAIK Prequel is inferring the database type from the connection name (mysql, pgsql, etc.). I can only specify one database connection, also.

In my case I have more than one database connection, all using the same driver (pgsql) but with different names. As such, when I try to access Prequel I get an error saying my database is not supported.

I would like to be able to use Prequel to manage all my connections. Am I missing something (namely some config option) that allows me to do so?

[BUG] Fields are not shown when using the $visible property

Describe the bug
When a model class uses the $visible property to hide attributes, attributes that are not included in the $visible array are not shown in Prequel.

To Reproduce
Use the $visible property instead of $hidden:

protected $visible = [
    'created_at',
    'email',
    'id',
    'name',
    'updated_at',
];

Screenshots
Expected view:
Screen Shot 2019-07-18 at 9 54 59 AM

Actual view:
Screen Shot 2019-07-18 at 9 52 48 AM

Fix
I think this can be fixed by changing line 76 of DatabaseController.php from

$paginated->setCollection($paginated->getCollection()->makeVisible($hidden));

to

$paginated->getCollection()->each->setHidden([])->each->setVisible([]);

Which removes both the $hidden and $visible properties from the objects in the collection.

[BUG] JS error

Describe the bug
Got JS error after installation
Laravel version: 5.8

Expected behavior
Site open normally.

Screenshots

Desktop (please complete the following information):

  • Browser Chrome
  • Version 75.0

[BUG] Incorrect DB credentials gives cryptic error

Describe the bug
Purposely, I set the password to my database connection to an incorrect value. Then I get an error of Oops... No valid database connection with a suggestion of You're using an irregular port number, usually the port is 3306 (Yours is: NaN)

Couple things wrong here:

  • because of the invalid connection, the code is zero'ing out all my config - I think it shouldn't set all the values to null
  • because of above, the JSON turns my port number to null (even though it's actually set right) Even so, it shouldn't say NaN - it should be filtered to parse the integer properly or display a better message

To Reproduce
Steps to reproduce the behavior:

  1. modify .env DB_PASSWORD value to be wrong.

Expected behavior
I think it could tell me what the error message was, and then also not null out my values. I'd like to see them because maybe I have a typo.

Additional context
Why would this happen you ask? Well, right now, it'd be very unlikely. But, you're publishing DB credential configuration in config/prequel.php - which means you most likely want us to use them, too. My .env file could be right, so my application works, but this configuration file (when implemented) might have a typo in it.

Because this is such a particularly weird issue to have, I'd rate it as pretty low priority.

[FIX] History API go to next or previous page events not updating view

When going to the previous or next page, the view won't update, but the URL does. There should be something like an event that dispatches and updates the currently selected database (in the view) based on the URL query parameters.

Possible solutions

  • Set a hook for the next and previous page events and update based on that URL

Note: when you're taking up this issue please leave a comment below to let the other users know!

[BUG] Table 'users'

Describe the bug
If selected any project database table it loads correct data but if select Users table it loads in any table the data of the current database project.

To Reproduce
Steps to reproduce the behavior:

  1. Go to current project users table
  2. Click on other project database users table
  3. See error

Expected behavior
Show data of selected database table, not the project installed prequel users table data.

Screenshots

alt text

Desktop (please complete the following information):

  • Chrome
  • Version 75

[FEATURE REQUEST] Scroll to top after table select

When we have lot of tables in the left column and we click on the name of a table in the bottom of the left column, we must scrolling to the top manually.

It would much better to go directly to the top of the screen like on phpmyadmin or sequel pro.

prequel not working

After installation when I am run prequel.
that's showing **
Create a fresh installation of laravel
install prequel using composer (i used the bets 0.6.2 version)
copy config and public resources
Run prequel
Shows the below image.

Oops... No valid database connection
Tried connecting through
://@:/
connection://user@host:port/database

1 SUGGESTION(S) FOUND

  • You're using an irregular port number, usually, the port is 3306 (Yours is: NaN)

image

I have tried everything but it's not working, But It's not working please help me

Support Laravel version > 6

composer install fails on latest laravel version 6.0.1. Are you guys planning on releasing a version supporting laravel > 6?

  Problem 1
    - Installation request for protoqol/prequel ^1.22 -> satisfiable by protoqol/prequel[v1.22].
    - Conclusion: remove laravel/framework v6.0.1
    - Conclusion: don't install laravel/framework v6.0.1
    - protoqol/prequel v1.22 requires laravel/framework ^5.6 -> satisfiable by laravel/framework[5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
    - Can only install one of: laravel/framework[5.6.x-dev, v6.0.1].
    - Can only install one of: laravel/framework[5.7.x-dev, v6.0.1].
    - Can only install one of: laravel/framework[5.8.x-dev, v6.0.1].
    - Installation request for laravel/framework (locked at v6.0.1, required as ^6.0) -> satisfiable by laravel/framework[v6.0.1].

[FIX] Tables with same name in different databases

When selecting a table, in a database underneath another database, that has a table with the same name, the first table is marked as active (meaning it gets a different text-color etc.). Meaning if the wrong database.table is marked as active.

Possible solutions

  • Better check to see which table is actually active. Like matching database names with table parent element.

Note: when you're taking up this issue please leave a comment below to let the other users know!

[BUG] Can't make it work with Homestead

So I wanted to try this package, I installed on my project but I have this error message when I want go to /prequel

prequel1

This is the database connection on my .env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=33060
DB_DATABASE=prequel
DB_USERNAME=homestead
DB_PASSWORD=secret

[FEATURE REQUEST] Custom Middleware for routes

Is your feature request related to a problem? Please describe.
I'm using this database tool to assist in debugging use data on local and production servers. I need developer to be able to securely visit this page in all environments.

Describe the solution you'd like
I'm hoping that we can add a new value to the config file which is called "middleware." This value will be set to an array of additional middleware I want added to the Prequel routes.

Describe alternatives you've considered
Alternatives could be a list of approved emails I can list into the config and only users by this email are permitted to see the Prequel routes and views.

Additional context
In order for this tool to be used in any sort of production context we'll need to have some sort of authentication.

[BUG] Routing

Describe the bug
The current api url is /prequel-api but status still querying the /prequel/prequel-api/status url.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/prequel'
  2. Open DevTools
  3. See status requests failing

Expected behavior
Seeing status query the right url so it can get the information from the database.

Screenshots
image

Desktop (please complete the following information):

  • Browser Google Chrome
  • Version 75

Additional context
This may be just for me as I have made some changes and now updated to latest version but not changed the routes file.
If it occurs for others too then change ->prefix('/prequel-api') to ->prefix(config('prequel.path') . '/prequel-api') or the js that makes the query.

[BUG] top of page formatting

On first page load at /prequel , the top area formatting breaks down and has overlapping UI components if user name is too long.

Expected behavior
Clean non-overlapping interface.

For azure I have to user a username like this -
[email protected]

For security people may user super long usernames as well.

Probably just a CSS fix or something

Chrome version Version 75.0.3770.100 (Official Build) (64-bit) Windows 10 64 bit

[BUG] Can not install on laravel 6

Problem 1
- Installation request for composer/composer (locked at 1.9.0) -> satisfiable by composer/composer[1.9.0].
- protoqol/prequel v1.22 requires composer/composer dev-master -> satisfiable by composer/composer[dev-master].
- protoqol/prequel v1.22.1 requires composer/composer dev-master -> satisfiable by composer/composer[dev-master].
- Conclusion: don't install composer/composer dev-master
- Installation request for protoqol/prequel ^1.22 -> satisfiable by protoqol/prequel[v1.22, v1.22.1].

[BUG] Malformed UTF-8 characters

There was an error while loading this table. See the following:
Malformed UTF-8 characters, possibly incorrectly encoded

How to fix to read my tables with this encode?

[FEATURE REQUEST] Customizable Authorization

Is your feature request related to a problem? Please describe.
Access to the dashboard is currently bound by an environment variable.

Describe the solution you'd like
Similar to Nova, Horizon, etc, Iโ€™d like to be able to enable access in production but restrict access based on different criteria like a user role, user email, IP address, etc.

Additional database type support

Why I need your help

Currently I'm working on a lot of features, which included adding support for different database types namely postgresql but that takes a lot of time and keeps me from adding the other features. So because of the time it takes I'm inclined to push back db support to the release after the upcoming one. But then still, it takes a lot of time.

My request

Is anyone willing to help me out with adding support for sqlite and sqlserver?

Support so far

[FEATURE REQUEST] Dockerize app

Is your feature request related to a problem? Please describe.
Dockerize web app. It would be easier to get up and running with this.

[BUG] There was an error while loading this table

Describe the bug
I tried to use your package, until displaying the database listing was running normally, when I clicked one of the tables from the database an error statement appeared

There was an error while loading this table. See the following:
Could not resolve error
Prequel suggests looking at the following points
Prequel could not suggest any fixes

Screenshots
gambar

Desktop (please complete the following information):

  • Browser : Mozila Firefox

Smartphone (please complete the following information):

  • Device: Laptop

[i18n] Help translate Prequel!

Internationalization

It has been decided that i18n for Prequel is definitely something people are looking for, see #33. That's why I need you guys to help translate! I am unfortunately not a polyglot ๐Ÿ˜…

Translators

How can I help translate?

  • Clone the Prequel repo and pull in the Dev branch
  • Create a new branch with the following naming convention: feature-lang-{your language here}.
  • Go into resources/lang/
  • Copy the en directory and rename it to the language you're translating to, e.g. fr for French.
  • Open the lang file inside the newly created directory and you're all set to start translation!
  • When you're done you can create a pull request!

[FEATURE REQUEST] Add pagination default to the config file

Is your feature request related to a problem? Please describe.
There's no problem. But, some people might not want 100 to be the default pagination from the API. I think we can put that value in the config file.

Describe the solution you'd like

  1. Make a config option for default pagination value
  2. Set it to 100
  3. Modify the controllers to use that.

[BUG] Users table fields are not showing all data

Describe the bug
In a database called "Main" the "Users" table missing two fields therefore the column isn't showing the right data but on any other table or database it is working see in the screenshots.

To Reproduce
I have not tried to reproduce the issue as this has been like this since first time opening the table. I guess it is something to do with the naming as I have seen

Expected behavior
Expected to see two more null fields.

Screenshots
On phpMyAdmin
Screenshot 2019-07-11 at 13 54 29

On Prequel
Screenshot 2019-07-11 at 13 35 39

Desktop (please complete the following information):

  • Browser: chrome
  • Version: 74

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.